Skip to content

KeyRatchet

An opaque handle to an MLS-derived key ratchet for a single participant.

Key ratchets are obtained from Session:getKeyRatchet(userId) after the MLS group has been established.

They are consumed by Encryptor:setKeyRatchet and Decryptor:transitionToKeyRatchet to enable authenticated encryption on a media stream. The underlying key material is owned by libdave; destroying the ratchet releases it.

KeyRatchet.handle  :: KeyRatchetHandle
KeyRatchet : destroy ( )  -> ()

Destroys the key ratchet and releases the associated key material. The ratchet must not be used after this call. Note that the Encryptor and Decryptor do not take ownership of the ratchet handle, so it remains the caller’s responsibility to destroy it when no longer needed.

KeyRatchet . new ( handle )  -> KeyRatchet

Constructs a KeyRatchet wrapper around an existing libdave handle. Called internally by Session:getKeyRatchet.

Parameters

handle: KeyRatchetHandle

Returns

KeyRatchet