Table of Contents

Class AirPlayHapPairVerifyProcedure

Namespace
AppleTvControlLibrary.Mrp.AirPlay.Auth
Assembly
AppleTvControlLibrary.Mrp.dll

Verify a previously-paired device is allowed to establish an AirPlay 2 control connection, and derive the resulting session encryption keys.

public sealed class AirPlayHapPairVerifyProcedure
Inheritance
AirPlayHapPairVerifyProcedure
Inherited Members

Remarks

Only the HAP pair-verify path is ported here (the path used by tvOS Apple TVs); pyatv's legacy and transient AirPlay auth variants are out of scope for MRP-over-AirPlay tunnel support (see auth/init.py — line 84-98 as of pyatv 0.18.0: HAP credentials are required for Apple TV once tvOS >= 13).

Constructors

AirPlayHapPairVerifyProcedure(HttpConnection, SrpAuthHandler, HapCredentials)

Verify a previously-paired device is allowed to establish an AirPlay 2 control connection, and derive the resulting session encryption keys.

public AirPlayHapPairVerifyProcedure(HttpConnection http, SrpAuthHandler srp, HapCredentials credentials)

Parameters

http HttpConnection

The AirPlay control connection.

srp SrpAuthHandler

The SRP handler used for key agreement.

credentials HapCredentials

The previously-paired credentials for the device.

Remarks

Only the HAP pair-verify path is ported here (the path used by tvOS Apple TVs); pyatv's legacy and transient AirPlay auth variants are out of scope for MRP-over-AirPlay tunnel support (see auth/init.py — line 84-98 as of pyatv 0.18.0: HAP credentials are required for Apple TV once tvOS >= 13).

Methods

EncryptionKeys(string, string, string)

Return the derived output/input encryption keys for the given salt/info strings.

public (byte[] OutputKey, byte[] InputKey) EncryptionKeys(string salt, string outputInfo, string inputInfo)

Parameters

salt string

The HKDF salt string.

outputInfo string

The HKDF info string for the output key.

inputInfo string

The HKDF info string for the input key.

Returns

(byte[] OutputKey, byte[] InputKey)

VerifyCredentialsAsync()

Verify the device is allowed to use AirPlay.

public Task<bool> VerifyCredentialsAsync()

Returns

Task<bool>

true if verification succeeded.