pub struct BackendCryptoProvider<'a> { /* private fields */ }Expand description
Adapter exposing an existing backend as the backend-native crypto provider.
Implementations§
Trait Implementations§
Source§impl CryptoProvider for BackendCryptoProvider<'_>
impl CryptoProvider for BackendCryptoProvider<'_>
Source§fn provider_id(&self) -> CryptoProviderId
fn provider_id(&self) -> CryptoProviderId
Stable provider identifier.
Source§fn generate_key<'life0, 'life1, 'async_trait>(
&'life0 self,
request: GenerateKey<'life1>,
) -> Pin<Box<dyn Future<Output = Result<NewKey, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate_key<'life0, 'life1, 'async_trait>(
&'life0 self,
request: GenerateKey<'life1>,
) -> Pin<Box<dyn Future<Output = Result<NewKey, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generate a new provider-native signing key.
Source§fn generate_sealing_key<'life0, 'life1, 'async_trait>(
&'life0 self,
request: GenerateSealingKey<'life1>,
) -> Pin<Box<dyn Future<Output = Result<NewKey, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate_sealing_key<'life0, 'life1, 'async_trait>(
&'life0 self,
request: GenerateSealingKey<'life1>,
) -> Pin<Box<dyn Future<Output = Result<NewKey, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generate a new provider-native KEM sealing (recipient) key.
Source§fn import_key<'life0, 'life1, 'async_trait>(
&'life0 self,
request: ImportKey<'life1>,
) -> Pin<Box<dyn Future<Output = Result<NewKey, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn import_key<'life0, 'life1, 'async_trait>(
&'life0 self,
request: ImportKey<'life1>,
) -> Pin<Box<dyn Future<Output = Result<NewKey, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Import caller-provided key material.
Source§fn sign<'life0, 'life1, 'async_trait>(
&'life0 self,
request: SignRequest<'life1>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sign<'life0, 'life1, 'async_trait>(
&'life0 self,
request: SignRequest<'life1>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sign in place.
Source§fn verify<'life0, 'life1, 'async_trait>(
&'life0 self,
request: VerifyRequest<'life1>,
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn verify<'life0, 'life1, 'async_trait>(
&'life0 self,
request: VerifyRequest<'life1>,
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Verify with provider-held public material.
Source§fn encapsulate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: EncapsulateRequest<'life1>,
) -> Pin<Box<dyn Future<Output = Result<Encapsulation, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn encapsulate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: EncapsulateRequest<'life1>,
) -> Pin<Box<dyn Future<Output = Result<Encapsulation, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
KEM encapsulation.
Source§fn decapsulate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: DecapsulateRequest<'life1>,
) -> Pin<Box<dyn Future<Output = Result<Zeroizing<Vec<u8>>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn decapsulate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: DecapsulateRequest<'life1>,
) -> Pin<Box<dyn Future<Output = Result<Zeroizing<Vec<u8>>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
KEM decapsulation.
Source§fn wrap_envelope<'life0, 'life1, 'async_trait>(
&'life0 self,
request: WrapEnvelopeRequest<'life1>,
) -> Pin<Box<dyn Future<Output = Result<Envelope, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn wrap_envelope<'life0, 'life1, 'async_trait>(
&'life0 self,
request: WrapEnvelopeRequest<'life1>,
) -> Pin<Box<dyn Future<Output = Result<Envelope, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
KEM plus envelope encryption.
Source§fn unwrap_envelope<'life0, 'life1, 'async_trait>(
&'life0 self,
request: UnwrapEnvelopeRequest<'life1>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unwrap_envelope<'life0, 'life1, 'async_trait>(
&'life0 self,
request: UnwrapEnvelopeRequest<'life1>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
KEM plus envelope decryption.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for BackendCryptoProvider<'a>
impl<'a> !UnwindSafe for BackendCryptoProvider<'a>
impl<'a> Freeze for BackendCryptoProvider<'a>
impl<'a> Send for BackendCryptoProvider<'a>
impl<'a> Sync for BackendCryptoProvider<'a>
impl<'a> Unpin for BackendCryptoProvider<'a>
impl<'a> UnsafeUnpin for BackendCryptoProvider<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request