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[]
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
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
Type
Gets the authentication type represented by these credentials.
public AuthenticationType Type { get; }
Property Value
Methods
Equals(HapCredentials?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(HapCredentials? other)
Parameters
otherHapCredentialsAn object to compare with this object.
Returns
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.