mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-08 07:56:55 -04:00
Revert get_or_create_store_cypher to use
This commit is contained in:
@@ -468,13 +468,13 @@ pub(crate) trait SqliteKeyValueStoreAsyncConnExt: SqliteAsyncConnExt {
|
||||
}
|
||||
} else {
|
||||
let cipher = StoreCipher::new()?;
|
||||
//#[cfg(not(test))]
|
||||
#[cfg(not(test))]
|
||||
let export = match secret {
|
||||
Secret::PassPhrase(passphrase) => cipher.export(&passphrase),
|
||||
Secret::Key(key) => cipher.export_with_key(&key),
|
||||
};
|
||||
//#[cfg(test)]
|
||||
//let export = cipher._insecure_export_fast_for_testing(passphrase);
|
||||
#[cfg(test)]
|
||||
let export = cipher._insecure_export_fast_for_testing(passphrase);
|
||||
self.set_kv("cipher", export?).await.map_err(OpenStoreError::SaveCipher)?;
|
||||
cipher
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user