pub enum Algorithm {
Sha1,
Sha256,
}Expand description
Digest algorithm used for certificate thumbprints.
Variants§
Sha1
SHA-1, 20 bytes / 40 hex characters. Identification only.
Sha256
SHA-256, 32 bytes / 64 hex characters.
Implementations§
Source§impl Algorithm
impl Algorithm
Sourcepub const fn for_hex_thumbprint(thumbprint: &str) -> Algorithm
pub const fn for_hex_thumbprint(thumbprint: &str) -> Algorithm
Selects the algorithm for a hex encoded thumbprint.
A thumbprint of exactly 40 characters is SHA-1, anything else is SHA-256
(matches the behavior of the public allowedThumbprints API).
Sourcepub const fn digest_len(self) -> usize
pub const fn digest_len(self) -> usize
Digest size in bytes.
Trait Implementations§
impl Copy for Algorithm
impl Eq for Algorithm
impl StructuralPartialEq for Algorithm
Auto Trait Implementations§
impl Freeze for Algorithm
impl RefUnwindSafe for Algorithm
impl Send for Algorithm
impl Sync for Algorithm
impl Unpin for Algorithm
impl UnsafeUnpin for Algorithm
impl UnwindSafe for Algorithm
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.