ts_crypto/
lib.rs

1//! Cryptography abstraction for my projects.
2//!
3
4extern crate alloc;
5
6pub mod any;
7pub mod edwards;
8pub mod elliptic;
9pub mod rsa;
10
11use pkcs8::AssociatedOid;
12
13pub use any::{SigningKey, VerifyingKey};
14pub use edwards::{EdwardsSigningKey, EdwardsVerifyingKey};
15pub use elliptic::{EllipticSigningKey, EllipticVerifyingKey};
16pub use rsa::{RsaSigningKey, RsaVerifyingKey};
17
18pub use sha2::{Sha256, Sha384, Sha512};
19
20/// Wrapper trait over common traits required for digest algorithms.
21pub trait Digest:
22    'static + digest::Digest + digest::DynDigest + Send + Sync + digest::FixedOutput + AssociatedOid
23{
24}
25impl<D> Digest for D where
26    D: 'static
27        + digest::Digest
28        + digest::DynDigest
29        + Send
30        + Sync
31        + digest::FixedOutput
32        + AssociatedOid
33{
34}