1use self::hash::HashAlgorithm;
4use crate::types::PublicParams;
5
6pub mod aead;
7pub mod aes_kw;
8pub mod mkv128_kw;
9pub mod checksum;
10pub mod dsa;
11pub mod ecc_curve;
12pub mod ecdh;
13pub mod ecdsa;
14pub mod eddsa;
15pub mod hash;
16pub mod public_key;
17pub mod rsa;
18pub mod sym;
19pub mod x25519;
20pub mod x448;
21
22pub trait Decryptor {
23 type EncryptionFields<'a>;
24
25 fn decrypt(&self, data: Self::EncryptionFields<'_>) -> crate::errors::Result<Vec<u8>>;
26}
27
28pub trait Signer {
29 fn sign(
31 &self,
32 hash: HashAlgorithm,
33 digest: &[u8],
34 pub_params: &PublicParams,
35 ) -> crate::errors::Result<Vec<Vec<u8>>>;
36}
37
38pub trait KeyParams {
39 type KeyParams;
40
41 fn key_params(&self) -> Self::KeyParams;
42}