Function matrix_sdk_crypto::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();