matrix_sdk_crypto

Function decrypt_room_key_export

Source
pub fn decrypt_room_key_export(
    input: impl Read,
    passphrase: &str,
) -> Result<Vec<ExportedRoomKey>, KeyExportError>
Expand description

Try to decrypt a reader into a list of exported room keys.

§Arguments

  • passphrase - The passphrase that was used to encrypt the exported keys.

§Examples

let exported_keys = decrypt_room_key_export(export, "1234").unwrap();
machine.store().import_room_keys(exported_keys, None, |_, _| {}).await.unwrap();