Table of Contents

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

roomHandle ulong

Native handle of the room, which the public API does not expose.

options KeyProviderOptions

The key provider options.

Properties

Options

Gets the key provider options.

public KeyProviderOptions Options { get; }

Property Value

KeyProviderOptions

Methods

ExportKey(string, int)

Exports the encryption key for a specific participant.

public byte[] ExportKey(string participantIdentity, int keyIndex = 0)

Parameters

participantIdentity string

The participant identity.

keyIndex int

The key index.

Returns

byte[]

The exported key.

ExportSharedKey(int)

Exports the shared encryption key.

public byte[] ExportSharedKey(int keyIndex = 0)

Parameters

keyIndex int

The 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

participantIdentity string

The participant identity.

keyIndex int

The key index.

Returns

byte[]

The new ratcheted key.

RatchetSharedKey(int)

Ratchets the shared encryption key.

public byte[] RatchetSharedKey(int keyIndex = 0)

Parameters

keyIndex int

The 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

participantIdentity string

The participant identity.

key byte[]

The encryption key.

keyIndex int

The key index.

SetSharedKey(byte[], int)

Sets the shared encryption key.

public void SetSharedKey(byte[] key, int keyIndex = 0)

Parameters

key byte[]

The encryption key.

keyIndex int

The key index.