Struct matrix_sdk_crypto::store::PickleKey [−][src]
pub struct PickleKey { /* fields omitted */ }Expand description
A pickle key that will be used to encrypt all the private keys for Olm.
Olm uses AES256 to encrypt accounts, sessions, inbound group sessions. We also implement our own pickling for the cross-signing types using AES256-GCM so the key sizes match.
Implementations
Get a PicklingMode version of this pickle key.
Encrypt and export our pickle key using the given passphrase.
Arguments
passphrase- The passphrase that should be used to encrypt the pickle key.
pub fn from_encrypted(
passphrase: &str,
encrypted: EncryptedPickleKey
) -> Result<Self, DecryptionError>
pub fn from_encrypted(
passphrase: &str,
encrypted: EncryptedPickleKey
) -> Result<Self, DecryptionError>
Restore a pickle key from an encrypted export.
Arguments
-
passphrase- The passphrase that should be used to encrypt the pickle key. -
encrypted- The exported and encrypted version of the pickle key.