Lines Matching refs:mac

32    auto mac = MessageAuthenticationCode::create_or_throw("SipHash(2,4)");  in crypto_shorthash_siphash24()  local
33 mac->set_key(key, crypto_shorthash_siphash24_KEYBYTES); in crypto_shorthash_siphash24()
34 mac->update(in, in_len); in crypto_shorthash_siphash24()
35 mac->final(out); in crypto_shorthash_siphash24()
44 auto mac = MessageAuthenticationCode::create_or_throw("Poly1305"); in crypto_onetimeauth_poly1305() local
45 mac->set_key(key, crypto_onetimeauth_poly1305_KEYBYTES); in crypto_onetimeauth_poly1305()
46 mac->update(in, in_len); in crypto_onetimeauth_poly1305()
47 mac->final(out); in crypto_onetimeauth_poly1305()
51 int Sodium::crypto_onetimeauth_poly1305_verify(const uint8_t mac[], in crypto_onetimeauth_poly1305_verify() argument
58 return crypto_verify_16(computed.data(), mac) ? 0 : -1; in crypto_onetimeauth_poly1305_verify()
66 auto mac = MessageAuthenticationCode::create_or_throw("HMAC(SHA-512)"); in crypto_auth_hmacsha512() local
67 mac->set_key(key, crypto_auth_hmacsha512_KEYBYTES); in crypto_auth_hmacsha512()
68 mac->update(in, in_len); in crypto_auth_hmacsha512()
69 mac->final(out); in crypto_auth_hmacsha512()
73 int Sodium::crypto_auth_hmacsha512_verify(const uint8_t mac[], in crypto_auth_hmacsha512_verify() argument
80 return crypto_verify_64(computed.data(), mac) ? 0 : -1; in crypto_auth_hmacsha512_verify()
88 auto mac = MessageAuthenticationCode::create_or_throw("HMAC(SHA-512)"); in crypto_auth_hmacsha512256() local
89 mac->set_key(key, crypto_auth_hmacsha512256_KEYBYTES); in crypto_auth_hmacsha512256()
90 mac->update(in, in_len); in crypto_auth_hmacsha512256()
93 mac->final(buf); in crypto_auth_hmacsha512256()
99 int Sodium::crypto_auth_hmacsha512256_verify(const uint8_t mac[], in crypto_auth_hmacsha512256_verify() argument
106 return crypto_verify_32(computed.data(), mac) ? 0 : -1; in crypto_auth_hmacsha512256_verify()
114 auto mac = MessageAuthenticationCode::create_or_throw("HMAC(SHA-256)"); in crypto_auth_hmacsha256() local
115 mac->set_key(key, crypto_auth_hmacsha256_KEYBYTES); in crypto_auth_hmacsha256()
116 mac->update(in, in_len); in crypto_auth_hmacsha256()
117 mac->final(out); in crypto_auth_hmacsha256()
121 int Sodium::crypto_auth_hmacsha256_verify(const uint8_t mac[], in crypto_auth_hmacsha256_verify() argument
128 return crypto_verify_32(computed.data(), mac) ? 0 : -1; in crypto_auth_hmacsha256_verify()