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
ltpkbyte[]Long-term public key of the peer.
ltskbyte[]Long-term secret key belonging to this client.
atvIdbyte[]Identifier of the Apple TV.
clientIdbyte[]Identifier of this client.
Properties
AtvId
Gets the identifier of the Apple TV.
public byte[] AtvId { get; }
Property Value
- byte[]
The identifier of the Apple TV.
ClientId
Gets the identifier of this client.
public byte[] ClientId { get; }
Property Value
- byte[]
The identifier of this client.
Ltpk
Gets the long-term public key of the peer.
public byte[] Ltpk { get; }
Property Value
- byte[]
The long-term public key of the peer.
Ltsk
Gets the long-term secret key belonging to this client.
public byte[] Ltsk { get; }
Property Value
- byte[]
The long-term secret key belonging to this client.
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
The shared "no credentials" instance. pyatv/auth/hap_pairing.py — line 135 as of pyatv 0.18.0
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
The shared "transient" credentials instance. pyatv/auth/hap_pairing.py — line 136 as of pyatv 0.18.0
Type
Gets the authentication type represented by these credentials.
public AuthenticationType Type { get; }
Property Value
- AuthenticationType
The authentication type represented by these credentials.
Methods
Equals(HapCredentials?)
Determines whether this instance equals another instance.
public bool Equals(HapCredentials? other)
Parameters
otherHapCredentialsThe instance to compare.
Returns
- bool
True if both instances have equal values; otherwise false.
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
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
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.