Table of Contents

Class HapCredentials

Namespace
AppleTvControlLibrary.Auth
Assembly
AppleTv.Hap.dll

Identifiers and encryption keys used by HAP.

public sealed class HapCredentials : IEquatable<HapCredentials>
Inheritance
HapCredentials
Implements
Inherited Members

Constructors

HapCredentials(byte[]?, byte[]?, byte[]?, byte[]?)

Initializes a new instance of the HapCredentials class.

public HapCredentials(byte[]? ltpk = null, byte[]? ltsk = null, byte[]? atvId = null, byte[]? clientId = null)

Parameters

ltpk byte[]

Long-term public key of the peer.

ltsk byte[]

Long-term secret key belonging to this client.

atvId byte[]

Identifier of the Apple TV.

clientId byte[]

Identifier of this client.

Properties

AtvId

Gets the identifier of the Apple TV.

public byte[] AtvId { get; }

Property Value

byte[]

ClientId

Gets the identifier of this client.

public byte[] ClientId { get; }

Property Value

byte[]

Ltpk

Gets the long-term public key of the peer.

public byte[] Ltpk { get; }

Property Value

byte[]

Ltsk

Gets the long-term secret key belonging to this client.

public byte[] Ltsk { get; }

Property Value

byte[]

NoCredentials

Gets the shared "no credentials" instance. pyatv/auth/hap_pairing.py — line 135 as of pyatv 0.18.0

public static HapCredentials NoCredentials { get; }

Property Value

HapCredentials

TransientCredentials

Gets the shared "transient" credentials instance. pyatv/auth/hap_pairing.py — line 136 as of pyatv 0.18.0

public static HapCredentials TransientCredentials { get; }

Property Value

HapCredentials

Type

Gets the authentication type represented by these credentials.

public AuthenticationType Type { get; }

Property Value

AuthenticationType

Methods

Equals(HapCredentials?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(HapCredentials? other)

Parameters

other HapCredentials

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Parse(string?)

Parse a string representation of HapCredentials.

public static HapCredentials Parse(string? detailString)

Parameters

detailString string

The string to parse, or null.

Returns

HapCredentials

The parsed credentials.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.