pub struct CryptoProvider {
pub p256_signing: &'static dyn P256SigningSuite,
}Expand description
Controls the cryptography used by this library.
Individual fields can be overridden using struct-update syntax against a
backend’s DEFAULT_PROVIDER:
ⓘ
CryptoProvider { sha256_hasher: &MyHasher, ..DEFAULT_PROVIDER }
.install_default()
.expect("provider already installed");Fields§
§p256_signing: &'static dyn P256SigningSuiteECDSA P-256 signing and verification.
Implementations§
Source§impl CryptoProvider
impl CryptoProvider
Sourcepub fn install_default(self) -> Result<(), Arc<Self>>
pub fn install_default(self) -> Result<(), Arc<Self>>
Sets this CryptoProvider as the default for this process.
After calling this, other callers can obtain a reference to the installed
default via CryptoProvider::get_default().
Sourcepub fn get_default() -> Option<&'static Arc<Self>>
pub fn get_default() -> Option<&'static Arc<Self>>
Returns the default CryptoProvider for this process.
This will be None if no default has been set yet.
Sourcepub fn default_provider() -> &'static Arc<Self> ⓘ
pub fn default_provider() -> &'static Arc<Self> ⓘ
The process default provider, installing the crate-feature default if none has been set.
Trait Implementations§
Source§impl Clone for CryptoProvider
impl Clone for CryptoProvider
Source§fn clone(&self) -> CryptoProvider
fn clone(&self) -> CryptoProvider
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for CryptoProvider
impl !UnwindSafe for CryptoProvider
impl Freeze for CryptoProvider
impl Send for CryptoProvider
impl Sync for CryptoProvider
impl Unpin for CryptoProvider
impl UnsafeUnpin for CryptoProvider
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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