mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 00:46:30 +03:00
Add benchmark for message decryption
This commit is contained in:
@@ -75,7 +75,10 @@ mod mimefactory;
|
||||
pub mod mimeparser;
|
||||
pub mod oauth2;
|
||||
mod param;
|
||||
#[cfg(not(feature = "internals"))]
|
||||
mod pgp;
|
||||
#[cfg(feature = "internals")]
|
||||
pub mod pgp;
|
||||
pub mod provider;
|
||||
pub mod qr;
|
||||
pub mod qr_code_generator;
|
||||
|
||||
@@ -149,6 +149,11 @@ pub(crate) fn create_keypair(addr: EmailAddress) -> Result<KeyPair> {
|
||||
Ok(key_pair)
|
||||
}
|
||||
|
||||
#[cfg(feature = "internals")]
|
||||
pub fn create_dummy_keypair(addr: &str) -> Result<KeyPair> {
|
||||
create_keypair(EmailAddress::new(addr)?)
|
||||
}
|
||||
|
||||
/// Selects a subkey of the public key to use for encryption.
|
||||
///
|
||||
/// Returns `None` if the public key cannot be used for encryption.
|
||||
|
||||
@@ -319,6 +319,11 @@ pub(crate) fn create_broadcast_shared_secret() -> String {
|
||||
res
|
||||
}
|
||||
|
||||
#[cfg(feature = "internals")]
|
||||
pub fn create_broadcast_shared_secret_pub() -> String {
|
||||
create_broadcast_shared_secret()
|
||||
}
|
||||
|
||||
/// Returns true if given string is a valid ID.
|
||||
///
|
||||
/// All IDs generated with `create_id()` should be considered valid.
|
||||
|
||||
Reference in New Issue
Block a user