Struct openssl::hash::MessageDigest
source · pub struct MessageDigest(/* private fields */);
Expand description
A message digest algorithm.
Implementations§
source§impl MessageDigest
impl MessageDigest
sourcepub unsafe fn from_ptr(x: *const EVP_MD) -> Self
pub unsafe fn from_ptr(x: *const EVP_MD) -> Self
Creates a MessageDigest
from a raw OpenSSL pointer.
Safety
The caller must ensure the pointer is valid.
sourcepub fn from_nid(type_: Nid) -> Option<MessageDigest>
pub fn from_nid(type_: Nid) -> Option<MessageDigest>
Returns the MessageDigest
corresponding to an Nid
.
This corresponds to EVP_get_digestbynid
.
sourcepub fn from_name(name: &str) -> Option<MessageDigest>
pub fn from_name(name: &str) -> Option<MessageDigest>
Returns the MessageDigest
corresponding to an algorithm name.
This corresponds to EVP_get_digestbyname
.
pub fn null() -> MessageDigest
pub fn md5() -> MessageDigest
pub fn sha1() -> MessageDigest
pub fn sha224() -> MessageDigest
pub fn sha256() -> MessageDigest
pub fn sha384() -> MessageDigest
pub fn sha512() -> MessageDigest
pub fn sha3_224() -> MessageDigest
pub fn sha3_256() -> MessageDigest
pub fn sha3_384() -> MessageDigest
pub fn sha3_512() -> MessageDigest
pub fn shake_128() -> MessageDigest
pub fn shake_256() -> MessageDigest
pub fn ripemd160() -> MessageDigest
pub fn sm3() -> MessageDigest
pub fn as_ptr(&self) -> *const EVP_MD
sourcepub fn block_size(&self) -> usize
pub fn block_size(&self) -> usize
The block size of the digest in bytes.
Trait Implementations§
source§impl Clone for MessageDigest
impl Clone for MessageDigest
source§fn clone(&self) -> MessageDigest
fn clone(&self) -> MessageDigest
Returns a copy 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 PartialEq<MessageDigest> for MessageDigest
impl PartialEq<MessageDigest> for MessageDigest
source§fn eq(&self, other: &MessageDigest) -> bool
fn eq(&self, other: &MessageDigest) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for MessageDigest
impl Eq for MessageDigest
impl Send for MessageDigest
impl StructuralEq for MessageDigest
impl StructuralPartialEq for MessageDigest
impl Sync for MessageDigest
Auto Trait Implementations§
impl RefUnwindSafe for MessageDigest
impl Unpin for MessageDigest
impl UnwindSafe for MessageDigest
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