Lines Matching refs:MessageDigest
78 use crate::hash::MessageDigest;
142 pub fn new<'a, T>(type_: MessageDigest, pkey: &PKeyRef<T>) -> Result<Signer<'a>, ErrorStack> in new() argument
165 type_: Option<MessageDigest>, in new_intern() argument
252 pub fn set_rsa_mgf1_md(&mut self, md: MessageDigest) -> Result<(), ErrorStack> { in set_rsa_mgf1_md()
436 pub fn new<T>(type_: MessageDigest, pkey: &'a PKeyRef<T>) -> Result<Verifier<'a>, ErrorStack> in new() argument
458 type_: Option<MessageDigest>, in new_intern() argument
545 pub fn set_rsa_mgf1_md(&mut self, md: MessageDigest) -> Result<(), ErrorStack> { in set_rsa_mgf1_md()
652 use crate::hash::MessageDigest;
679 let mut signer = Signer::new(MessageDigest::sha256(), &pkey).unwrap(); in rsa_sign()
694 let mut verifier = Verifier::new(MessageDigest::sha256(), &pkey).unwrap(); in rsa_verify_ok()
706 let mut verifier = Verifier::new(MessageDigest::sha256(), &pkey).unwrap(); in rsa_verify_invalid()
713 fn test_hmac(ty: MessageDigest, tests: &[(Vec<u8>, Vec<u8>, Vec<u8>)]) { in test_hmac() argument
766 test_hmac(MessageDigest::md5(), &tests); in hmac_md5()
813 test_hmac(MessageDigest::sha1(), &tests); in hmac_sha1()
839 let mut signer = Signer::new(MessageDigest::sha256(), &key).unwrap(); in ec()
843 let mut verifier = Verifier::new(MessageDigest::sha256(), &key).unwrap(); in ec()
867 let mut signer = Signer::new(MessageDigest::sha256(), &pkey).unwrap(); in rsa_sign_verify()
873 signer.set_rsa_mgf1_md(MessageDigest::sha256()).unwrap(); in rsa_sign_verify()
877 let mut verifier = Verifier::new(MessageDigest::sha256(), &pkey).unwrap(); in rsa_sign_verify()
882 verifier.set_rsa_mgf1_md(MessageDigest::sha256()).unwrap(); in rsa_sign_verify()