Class KeyProvider
- Namespace
- LiveKit.Rtc
- Assembly
- LivekitRtc.dll
Provides key management for E2EE.
public class KeyProvider
- Inheritance
-
KeyProvider
- Inherited Members
Constructors
KeyProvider(ulong, KeyProviderOptions)
Used by the SDK, which creates the key provider with the E2EE manager. Get it from KeyProvider instead of constructing it.
public KeyProvider(ulong roomHandle, KeyProviderOptions options)
Parameters
roomHandleulongNative handle of the room, which the public API does not expose.
optionsKeyProviderOptionsThe key provider options.
Properties
Options
Gets the key provider options.
public KeyProviderOptions Options { get; }
Property Value
Methods
ExportKey(string, int)
Exports the encryption key for a specific participant.
public byte[] ExportKey(string participantIdentity, int keyIndex = 0)
Parameters
Returns
- byte[]
The exported key.
ExportSharedKey(int)
Exports the shared encryption key.
public byte[] ExportSharedKey(int keyIndex = 0)
Parameters
keyIndexintThe key index.
Returns
- byte[]
The exported key.
RatchetKey(string, int)
Ratchets the encryption key for a specific participant.
public byte[] RatchetKey(string participantIdentity, int keyIndex = 0)
Parameters
Returns
- byte[]
The new ratcheted key.
RatchetSharedKey(int)
Ratchets the shared encryption key.
public byte[] RatchetSharedKey(int keyIndex = 0)
Parameters
keyIndexintThe key index.
Returns
- byte[]
The new ratcheted key.
SetKey(string, byte[], int)
Sets the encryption key for a specific participant.
public void SetKey(string participantIdentity, byte[] key, int keyIndex = 0)
Parameters
participantIdentitystringThe participant identity.
keybyte[]The encryption key.
keyIndexintThe key index.
SetSharedKey(byte[], int)
Sets the shared encryption key.
public void SetSharedKey(byte[] key, int keyIndex = 0)