pub struct Md(_);
Expand description
A message digest algorithm.
Implementations§
source§impl Md
impl Md
sourcepub fn from_nid(type_: Nid) -> Option<&'static MdRef>
pub fn from_nid(type_: Nid) -> Option<&'static MdRef>
Returns the Md
corresponding to an Nid
.
This corresponds to EVP_get_digestbynid
.
sourcepub fn fetch(
ctx: Option<&LibCtxRef>,
algorithm: &str,
properties: Option<&str>
) -> Result<Self, ErrorStack>
pub fn fetch( ctx: Option<&LibCtxRef>, algorithm: &str, properties: Option<&str> ) -> Result<Self, ErrorStack>
Fetches an Md
object corresponding to the specified algorithm name and properties.
Requires OpenSSL 3.0.0 or newer.
This corresponds to EVP_MD_fetch
.
pub fn null() -> &'static MdRef
pub fn md5() -> &'static MdRef
pub fn sha1() -> &'static MdRef
pub fn sha224() -> &'static MdRef
pub fn sha256() -> &'static MdRef
pub fn sha384() -> &'static MdRef
pub fn sha512() -> &'static MdRef
pub fn sha3_224() -> &'static MdRef
pub fn sha3_256() -> &'static MdRef
pub fn sha3_384() -> &'static MdRef
pub fn sha3_512() -> &'static MdRef
pub fn shake128() -> &'static MdRef
pub fn shake256() -> &'static MdRef
pub fn ripemd160() -> &'static MdRef
pub fn sm3() -> &'static MdRef
Methods from Deref<Target = MdRef>§
sourcepub fn block_size(&self) -> usize
pub fn block_size(&self) -> usize
Returns the block size of the digest in bytes.
This corresponds to EVP_MD_block_size
.
sourcepub fn size(&self) -> usize
pub fn size(&self) -> usize
Returns the size of the digest in bytes.
This corresponds to EVP_MD_size
.
sourcepub fn type_(&self) -> Nid
pub fn type_(&self) -> Nid
Returns the Nid
of the digest.
This corresponds to EVP_MD_type
.