pub struct RustCryptoProvider;Expand description
Default crypto provider backed by the RustCrypto crate ecosystem.
This is a stateless unit struct that dispatches to the appropriate RustCrypto implementations based on the protocol enum values.
Trait Implementations§
Source§impl CryptoProvider for RustCryptoProvider
impl CryptoProvider for RustCryptoProvider
Source§fn hash(&self, protocol: AuthProtocol, data: &[u8]) -> CryptoResult<Vec<u8>>
fn hash(&self, protocol: AuthProtocol, data: &[u8]) -> CryptoResult<Vec<u8>>
Compute a bare hash digest using the protocol’s hash function. Read more
Source§fn password_to_key(
&self,
protocol: AuthProtocol,
password: &[u8],
) -> CryptoResult<Vec<u8>>
fn password_to_key( &self, protocol: AuthProtocol, password: &[u8], ) -> CryptoResult<Vec<u8>>
Derive a master key from a password using the RFC 3414 Section A.2.1 algorithm. Read more
Source§fn localize_key(
&self,
protocol: AuthProtocol,
master_key: &[u8],
engine_id: &[u8],
) -> CryptoResult<Vec<u8>>
fn localize_key( &self, protocol: AuthProtocol, master_key: &[u8], engine_id: &[u8], ) -> CryptoResult<Vec<u8>>
Localize a master key to a specific engine ID (RFC 3414 Section A.2.2). Read more
Source§fn compute_hmac(
&self,
protocol: AuthProtocol,
key: &[u8],
slices: &[&[u8]],
truncate_len: usize,
) -> CryptoResult<Vec<u8>>
fn compute_hmac( &self, protocol: AuthProtocol, key: &[u8], slices: &[&[u8]], truncate_len: usize, ) -> CryptoResult<Vec<u8>>
Compute HMAC over one or more data slices, truncated to
truncate_len bytes. Read moreSource§fn encrypt(
&self,
protocol: PrivProtocol,
key: &[u8],
iv: &[u8],
data: &mut [u8],
) -> CryptoResult<()>
fn encrypt( &self, protocol: PrivProtocol, key: &[u8], iv: &[u8], data: &mut [u8], ) -> CryptoResult<()>
Encrypt data in place using the specified privacy protocol. Read more
Source§fn decrypt(
&self,
protocol: PrivProtocol,
key: &[u8],
iv: &[u8],
data: &mut [u8],
) -> CryptoResult<()>
fn decrypt( &self, protocol: PrivProtocol, key: &[u8], iv: &[u8], data: &mut [u8], ) -> CryptoResult<()>
Decrypt data in place using the specified privacy protocol. Read more
Auto Trait Implementations§
impl Freeze for RustCryptoProvider
impl RefUnwindSafe for RustCryptoProvider
impl Send for RustCryptoProvider
impl Sync for RustCryptoProvider
impl Unpin for RustCryptoProvider
impl UnsafeUnpin for RustCryptoProvider
impl UnwindSafe for RustCryptoProvider
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more