File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
crates/matrix-sdk-crypto/src/backups Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,13 @@ impl BackupMachine {
179
179
180
180
/// Activate the given backup key to be used to encrypt and backup room
181
181
/// keys.
182
- pub async fn enable_backup ( & self , key : MegolmV1BackupKey ) -> Result < ( ) , CryptoStoreError > {
182
+ ///
183
+ /// This will use the [`m.megolm_backup.v1.curve25519-aes-sha2`] algorithm
184
+ /// to encrypt the room keys.
185
+ ///
186
+ /// [`m.megolm_backup.v1.curve25519-aes-sha2`]:
187
+ /// https://spec.matrix.org/unstable/client-server-api/#backup-algorithm-mmegolm_backupv1curve25519-aes-sha2
188
+ pub async fn enable_backup_v1 ( & self , key : MegolmV1BackupKey ) -> Result < ( ) , CryptoStoreError > {
183
189
if key. backup_version ( ) . is_some ( ) {
184
190
* self . backup_key . write ( ) . await = Some ( key. clone ( ) ) ;
185
191
info ! ( backup_key =? key, "Activated a backup" ) ;
@@ -414,7 +420,7 @@ mod test {
414
420
let backup_key = recovery_key. public_key ( ) ;
415
421
backup_key. set_version ( "1" . to_owned ( ) ) ;
416
422
417
- backup_machine. enable_backup ( backup_key) . await ?;
423
+ backup_machine. enable_backup_v1 ( backup_key) . await ?;
418
424
419
425
let request =
420
426
backup_machine. backup ( ) . await ?. expect ( "Created a backup request successfully" ) ;
You can’t perform that action at this time.
0 commit comments