pub struct Sha256(/* private fields */);
Expand description
A SHA-256 fingerprint of the certificate.
Note for anyone who wants to verify the output, it should be similar to the output for the following command:
openssl x509 -noout -fingerprint -sha256 -in certificate.pem
Implementations§
Source§impl Sha256
impl Sha256
Sourcepub fn compute_for_der(cert: &[u8]) -> Self
pub fn compute_for_der(cert: &[u8]) -> Self
Compute the SHA-256 fingerprint of the certificate data encoded in the DER format.
Sourcepub const fn from_fingerprint_bytes(bytes: [u8; 32]) -> Self
pub const fn from_fingerprint_bytes(bytes: [u8; 32]) -> Self
Create a Sha256
fingerprint object from the precomputed fingerprint
bytes.
Might be useful to someone who want to use the display implementation.
Sourcepub const fn into_inner(self) -> [u8; 32]
pub const fn into_inner(self) -> [u8; 32]
Return the 32-byte array of the signature data.
Trait Implementations§
impl Copy for Sha256
impl Eq for Sha256
impl StructuralPartialEq for Sha256
Auto Trait Implementations§
impl Freeze for Sha256
impl RefUnwindSafe for Sha256
impl Send for Sha256
impl Sync for Sha256
impl Unpin for Sha256
impl UnwindSafe for Sha256
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