pub struct CertFingerprint { /* private fields */ }Expand description
SHA-256 certificate fingerprint in SHA256:<hex> format.
Equality comparisons are constant-time to prevent timing side-channels.
Implementations§
Source§impl CertFingerprint
impl CertFingerprint
Sourcepub fn from_der(der: &[u8]) -> CertFingerprint
pub fn from_der(der: &[u8]) -> CertFingerprint
Compute fingerprint from DER-encoded certificate.
Sourcepub fn from_bytes(bytes: [u8; 32]) -> CertFingerprint
pub fn from_bytes(bytes: [u8; 32]) -> CertFingerprint
Create from raw bytes.
Sourcepub fn parse(s: &str) -> Result<CertFingerprint, CryptoError>
pub fn parse(s: &str) -> Result<CertFingerprint, CryptoError>
Parse from SHA256:<hex> string format.
§Errors
Returns CryptoError::InvalidFingerprint if the format is invalid.
Trait Implementations§
Source§impl Clone for CertFingerprint
impl Clone for CertFingerprint
Source§fn clone(&self) -> CertFingerprint
fn clone(&self) -> CertFingerprint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CertFingerprint
impl Debug for CertFingerprint
Source§impl<'de> Deserialize<'de> for CertFingerprint
impl<'de> Deserialize<'de> for CertFingerprint
Source§fn deserialize<D>(
deserializer: D,
) -> Result<CertFingerprint, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<CertFingerprint, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CertFingerprint
impl Display for CertFingerprint
Source§impl FromStr for CertFingerprint
impl FromStr for CertFingerprint
Source§type Err = CryptoError
type Err = CryptoError
The associated error which can be returned from parsing.
Source§fn from_str(
s: &str,
) -> Result<CertFingerprint, <CertFingerprint as FromStr>::Err>
fn from_str( s: &str, ) -> Result<CertFingerprint, <CertFingerprint as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for CertFingerprint
impl Hash for CertFingerprint
Source§impl PartialEq for CertFingerprint
impl PartialEq for CertFingerprint
Source§impl Serialize for CertFingerprint
impl Serialize for CertFingerprint
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<&str> for CertFingerprint
impl TryFrom<&str> for CertFingerprint
Source§type Error = CryptoError
type Error = CryptoError
The type returned in the event of a conversion error.
Source§fn try_from(
s: &str,
) -> Result<CertFingerprint, <CertFingerprint as TryFrom<&str>>::Error>
fn try_from( s: &str, ) -> Result<CertFingerprint, <CertFingerprint as TryFrom<&str>>::Error>
Performs the conversion.
Source§impl TryFrom<String> for CertFingerprint
impl TryFrom<String> for CertFingerprint
Source§type Error = CryptoError
type Error = CryptoError
The type returned in the event of a conversion error.
Source§fn try_from(
s: String,
) -> Result<CertFingerprint, <CertFingerprint as TryFrom<String>>::Error>
fn try_from( s: String, ) -> Result<CertFingerprint, <CertFingerprint as TryFrom<String>>::Error>
Performs the conversion.
impl Eq for CertFingerprint
Auto Trait Implementations§
impl Freeze for CertFingerprint
impl RefUnwindSafe for CertFingerprint
impl Send for CertFingerprint
impl Sync for CertFingerprint
impl Unpin for CertFingerprint
impl UnsafeUnpin for CertFingerprint
impl UnwindSafe for CertFingerprint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.