mirror of
https://github.com/chatmail/core.git
synced 2026-10-01 18:50:39 +03:00
refactor: make crate::pgp::symm_encrypt_message non-async
This commit is contained in:
+5
-2
@@ -83,12 +83,15 @@ impl EncryptHelper {
|
||||
None
|
||||
};
|
||||
|
||||
let shared_secret = shared_secret.to_string();
|
||||
let mut raw_message = Vec::new();
|
||||
let cursor = Cursor::new(&mut raw_message);
|
||||
mail_to_encrypt.clone().write_part(cursor).ok();
|
||||
|
||||
let ctext =
|
||||
pgp::symm_encrypt_message(raw_message, sign_key, shared_secret, compress).await?;
|
||||
let ctext = tokio::task::spawn_blocking(move || {
|
||||
pgp::symm_encrypt_message(raw_message, sign_key, shared_secret, compress)
|
||||
})
|
||||
.await??;
|
||||
|
||||
Ok(ctext)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user