in src/crypto/mod.rs [81:109]
fn generate_ephemeral_keypair(&self) -> Result<Box<dyn LocalKeyPair>>;
/// Import a local keypair from its raw components.
fn import_key_pair(&self, components: &EcKeyComponents) -> Result<Box<dyn LocalKeyPair>>;
/// Import the public key component in the binary uncompressed point representation.
fn import_public_key(&self, raw: &[u8]) -> Result<Box<dyn RemotePublicKey>>;
fn compute_ecdh_secret(
&self,
remote: &dyn RemotePublicKey,
local: &dyn LocalKeyPair,
) -> Result<Vec<u8>>;
fn hkdf_sha256(&self, salt: &[u8], secret: &[u8], info: &[u8], len: usize) -> Result<Vec<u8>>;
/// Should return [ciphertext, auth_tag].
fn aes_gcm_128_encrypt(&self, key: &[u8], iv: &[u8], data: &[u8]) -> Result<Vec<u8>>;
fn aes_gcm_128_decrypt(
&self,
key: &[u8],
iv: &[u8],
ciphertext_and_tag: &[u8],
) -> Result<Vec<u8>>;
fn random_bytes(&self, dest: &mut [u8]) -> Result<()>;
}
/// Run a small suite of tests to check that a `Cryptographer` backend is working correctly.
///
/// You should only use this is you're implementing a custom `Cryptographer` and want to check
/// that it is working as intended. This function will panic if the tests fail.
///
#[cfg(any(test, feature = "backend-test-helper"))]
pub fn test_cryptographer<T: Cryptographer>(cryptographer: T) {