pub struct DefaultCryptoProvider;Expand description
Trait Implementations§
Source§impl Clone for DefaultCryptoProvider
impl Clone for DefaultCryptoProvider
Source§fn clone(&self) -> DefaultCryptoProvider
fn clone(&self) -> DefaultCryptoProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CryptoProvider for DefaultCryptoProvider
impl CryptoProvider for DefaultCryptoProvider
Source§type Hasher = Hasher
type Hasher = Hasher
Opaque incremental hash state, must be Clone for transcript checkpointing.
Source§type AeadKey = AeadKey
type AeadKey = AeadKey
A distinct type is used to avoid computation for ench encrypt / decrypt operation for some
ciphers (e.g. AES key expanding)
fn cipher_suites() -> &'static [CipherSuite]
fn signature_schemes() -> &'static [SignatureScheme]
fn key_exchange_groups() -> &'static [KeyExchangeGroup]
fn new_aead_key(&self, suite: CipherSuite, key: &[u8]) -> Self::AeadKey
Source§fn new_hash(&self, suite: CipherSuite) -> Self::Hasher
fn new_hash(&self, suite: CipherSuite) -> Self::Hasher
Create a new incremental hash state for the given suite.
Source§fn hash_update(&self, state: &mut Self::Hasher, data: &[u8])
fn hash_update(&self, state: &mut Self::Hasher, data: &[u8])
Absorb data into the hash state.
Source§fn hash_finalize(&self, state: Self::Hasher) -> Result<Hash, Error>
fn hash_finalize(&self, state: Self::Hasher) -> Result<Hash, Error>
Finalize the hash and write the digest into
out. Consumes the state.fn secure_random(&self, buf: &mut [u8])
Source§fn hash(&self, suite: CipherSuite, data: &[u8]) -> Result<Hash, Error>
fn hash(&self, suite: CipherSuite, data: &[u8]) -> Result<Hash, Error>
One-shot hash (default implementation uses the incremental API).
fn hmac( &self, suite: CipherSuite, key: &Hash, data: &[u8], ) -> Result<Hash, Error>
fn hkdf_extract( &self, suite: CipherSuite, salt: &Hash, ikm: &[u8], ) -> Result<Hash, Error>
fn hkdf_expand_label( &self, out: &mut [u8], suite: CipherSuite, secret: &Hash, label: &[u8], context: &[u8], ) -> Result<(), Error>
fn aead_encrypt( &self, key: &Self::AeadKey, nonce: &[u8], aad: &[u8], data: &mut [u8], plaintext_len: usize, ) -> Result<usize, Error>
fn aead_decrypt( &self, key: &Self::AeadKey, nonce: &[u8], aad: &[u8], data: &mut [u8], ) -> Result<usize, Error>
fn key_exchange_generate_keypair( &self, group: KeyExchangeGroup, ) -> Result<(KeyExchangeSecretKey, KeyExchangePublicKey), Error>
fn key_exchange( &self, secret: &KeyExchangeSecretKey, peer_public: &[u8], ) -> Result<Vec<u8, KEY_EXCHANGE_SHARED_SECRET_MAX_SIZE>, Error>
fn sign( &self, scheme: SignatureScheme, secret_key: &[u8], data: &[u8], ) -> Result<Vec<u8, SIGNATURE_MAX_SIZE>, Error>
fn verify( &self, scheme: SignatureScheme, public_key: &[u8], data: &[u8], signature: &[u8], ) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for DefaultCryptoProvider
impl RefUnwindSafe for DefaultCryptoProvider
impl Send for DefaultCryptoProvider
impl Sync for DefaultCryptoProvider
impl Unpin for DefaultCryptoProvider
impl UnsafeUnpin for DefaultCryptoProvider
impl UnwindSafe for DefaultCryptoProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more