pub struct CryptoProvider {
pub hash: HashProvider,
pub cert: WebPkiVerifier,
pub signer: SignerProvider,
pub signature: SignatureVerifierProvider,
}
Expand description
Cryptography provider.
§Custom Algorithms
This is the primary interface for extending cryptographic functionality. The various providers can be configured with custom algorithms and implementations.
Algorithms are uniquely identified using an 8-bit ID, eg.
HashAlgId
, half of which is reserved for the
officially supported algorithms. If you think that a new algorithm should be
added to the official set, please open an issue. Beware that other parties
may assign different algorithms to the same ID as you, and we make no effort
to mitigate this.
Fields§
§hash: HashProvider
Hash provider.
cert: WebPkiVerifier
Certificate verifier.
This is used to verify the server’s certificate chain.
The default verifier uses the Mozilla root certificates.
signer: SignerProvider
Signer provider.
This is used for signing attestations.
signature: SignatureVerifierProvider
Signature verifier provider.
This is used for verifying signatures of attestations.
Trait Implementations§
source§impl Debug for CryptoProvider
impl Debug for CryptoProvider
Auto Trait Implementations§
impl Freeze for CryptoProvider
impl !RefUnwindSafe for CryptoProvider
impl Send for CryptoProvider
impl Sync for CryptoProvider
impl Unpin for CryptoProvider
impl !UnwindSafe for CryptoProvider
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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