Home
last modified time | relevance | path

Searched refs:hmac (Results 1 – 25 of 71) sorted by relevance

123

/external/dhcpcd-6.8.2/test/
Dtest_hmac_md5.c37 print_hmac(uint8_t *hmac) in print_hmac() argument
43 printf("%02x", *hmac++); in print_hmac()
50 uint8_t hmac[16]; in hmac_md5_test1() local
58 hmac_md5(text, 8, key, 16, hmac); in hmac_md5_test1()
59 print_hmac(hmac); in hmac_md5_test1()
66 uint8_t hmac[16]; in hmac_md5_test2() local
71 hmac_md5(text, 28, key, 4, hmac); in hmac_md5_test2()
72 print_hmac(hmac); in hmac_md5_test2()
79 uint8_t hmac[16]; in hmac_md5_test3() local
89 hmac_md5(text, 50, key, 16, hmac); in hmac_md5_test3()
[all …]
/external/python/cpython2/Lib/test/
Dtest_hmac.py3 import hmac
15 h = hmac.HMAC(key, data)
49 h = hmac.HMAC(key, data, digestmod=hashlib.sha1)
83 h = hmac.HMAC(key, data, digestmod=hashfunc)
219 hmac.HMAC('a', 'b', digestmod=MockCrazyHash)
224 hmac.HMAC('a', 'b', digestmod=MockCrazyHash)
235 h = hmac.HMAC("key")
242 h = hmac.HMAC("key", "hash this!")
249 h = hmac.HMAC("key", "", hashlib.sha1)
258 h = hmac.HMAC("key")
[all …]
Dtest_pep247.py12 import hmac
68 self.check_module(hmac, key='abc')
/external/libchrome/crypto/
Dhmac_unittest.cc80 crypto::HMAC hmac(crypto::HMAC::SHA1); in TEST() local
81 ASSERT_TRUE(hmac.Init(kClientKey, kKeySize)); in TEST()
84 EXPECT_TRUE(hmac.Sign(message_data, calculated_hmac, kSHA1DigestSize)); in TEST()
149 crypto::HMAC hmac(crypto::HMAC::SHA1); in TEST() local
150 ASSERT_TRUE(hmac.Init(reinterpret_cast<const unsigned char*>(cases[i].key), in TEST()
154 EXPECT_TRUE(hmac.Sign(data_string, digest, kSHA1DigestSize)); in TEST()
175 crypto::HMAC hmac(crypto::HMAC::SHA256); in TEST() local
176 ASSERT_TRUE(hmac.Init(key, sizeof(key))); in TEST()
179 EXPECT_EQ(kSHA256DigestSize, hmac.DigestLength()); in TEST()
180 EXPECT_TRUE(hmac.Sign(data, calculated_hmac, kSHA256DigestSize)); in TEST()
[all …]
Dcrypto.gypi12 'hmac.cc',
13 'hmac.h',
/external/boringssl/src/ssl/test/runner/
Dhkdf.go27 hmac := hmac.New(hash, salt)
28 hmac.Write(ikm)
29 return hmac.Sum(nil)
44 hmac := hmac.New(hash, prk)
46 hmac.Reset()
48 hmac.Write(lastBlock)
49 hmac.Write(info)
50 hmac.Write([]byte{counter})
51 block := hmac.Sum(nil)
Dshim_ticket.go35 h := hmac.New(sha256.New, macKey)
55 if !hmac.Equal(mac, h.Sum(nil)) {
92 h := hmac.New(sha256.New, macKey)
/external/tcpdump/tests/
Dikev2pI2.out6 (t: #2 type=integ id=hmac-sha )
7 (t: #3 type=prf id=hmac-sha )
11 (t: #2 type=integ id=hmac-sha )
12 (t: #3 type=prf id=hmac-md5 )
16 (t: #2 type=integ id=hmac-sha )
17 (t: #3 type=prf id=hmac-sha )
21 (t: #2 type=integ id=hmac-sha )
22 (t: #3 type=prf id=hmac-md5 )
26 (t: #2 type=integ id=hmac-sha )
27 (t: #3 type=prf id=hmac-sha )
[all …]
Dikev2four.out9 (t: #5 type=prf id=hmac-sha )
10 (t: #6 type=prf id=hmac-md5 )
12 (t: #8 type=integ id=hmac-sha )
13 (t: #9 type=integ id=hmac-md5 )
33 (t: #5 type=prf id=hmac-sha )
34 (t: #6 type=prf id=hmac-md5 )
36 (t: #8 type=integ id=hmac-sha )
37 (t: #9 type=integ id=hmac-md5 )
50 (t: #2 type=prf id=hmac-sha )
51 (t: #3 type=integ id=hmac-sha )
Dikev2fourv4.out9 (t: #5 type=prf id=hmac-sha )
10 (t: #6 type=prf id=hmac-md5 )
12 (t: #8 type=integ id=hmac-sha )
13 (t: #9 type=integ id=hmac-md5 )
33 (t: #5 type=prf id=hmac-sha )
34 (t: #6 type=prf id=hmac-md5 )
36 (t: #8 type=integ id=hmac-sha )
37 (t: #9 type=integ id=hmac-md5 )
50 (t: #2 type=prf id=hmac-sha )
51 (t: #3 type=integ id=hmac-sha )
Dikev2fourv.out9 (t: #5 type=prf id=hmac-sha )
10 (t: #6 type=prf id=hmac-md5 )
12 (t: #8 type=integ id=hmac-sha )
13 (t: #9 type=integ id=hmac-md5 )
33 (t: #5 type=prf id=hmac-sha )
34 (t: #6 type=prf id=hmac-md5 )
36 (t: #8 type=integ id=hmac-sha )
37 (t: #9 type=integ id=hmac-md5 )
50 (t: #2 type=prf id=hmac-sha )
51 (t: #3 type=integ id=hmac-sha )
Dikev2pI2-segfault-v.out6 (t: #2 type=integ id=hmac-sha )
7 (t: #3 type=prf id=hmac-sha )
/external/boringssl/src/crypto/hkdf/
Dhkdf.c68 HMAC_CTX hmac; in HKDF_expand() local
77 HMAC_CTX_init(&hmac); in HKDF_expand()
78 if (!HMAC_Init_ex(&hmac, prk, prk_len, digest, NULL)) { in HKDF_expand()
86 if (i != 0 && (!HMAC_Init_ex(&hmac, NULL, 0, NULL, NULL) || in HKDF_expand()
87 !HMAC_Update(&hmac, previous, digest_len))) { in HKDF_expand()
90 if (!HMAC_Update(&hmac, info, info_len) || in HKDF_expand()
91 !HMAC_Update(&hmac, &ctr, 1) || in HKDF_expand()
92 !HMAC_Final(&hmac, previous, NULL)) { in HKDF_expand()
107 HMAC_CTX_cleanup(&hmac); in HKDF_expand()
/external/wpa_supplicant_8/src/tls/
Dtlsv1_record.c155 struct crypto_hash *hmac; in tlsv1_record_send() local
207 hmac = crypto_hash_init(rl->hash_alg, rl->write_mac_secret, in tlsv1_record_send()
209 if (hmac == NULL) { in tlsv1_record_send()
214 crypto_hash_update(hmac, rl->write_seq_num, TLS_SEQ_NUM_LEN); in tlsv1_record_send()
216 crypto_hash_update(hmac, ct_start, TLS_RECORD_HEADER_LEN); in tlsv1_record_send()
217 crypto_hash_update(hmac, payload, payload_len); in tlsv1_record_send()
222 crypto_hash_finish(hmac, NULL, NULL); in tlsv1_record_send()
226 if (crypto_hash_finish(hmac, pos, &clen) < 0) { in tlsv1_record_send()
284 struct crypto_hash *hmac; in tlsv1_record_receive() local
436 hmac = crypto_hash_init(rl->hash_alg, rl->read_mac_secret, in tlsv1_record_receive()
[all …]
/external/bouncycastle/bcpkix/src/main/java/org/bouncycastle/cms/
DPasswordRecipient.java21 private final String hmac; field in PasswordRecipient.PRF
24 private PRF(String hmac, AlgorithmIdentifier prfAlgID) in PRF() argument
26 this.hmac = hmac; in PRF()
32 return hmac; in getName()
/external/dhcpcd-6.8.2/
Dauth.c117 uint8_t hmac[HMAC_LENGTH]; in dhcp_auth_validate() local
184 if (dlen < sizeof(secretid) + sizeof(hmac)) { in dhcp_auth_validate()
193 if (dlen < sizeof(secretid) + sizeof(hmac)) { in dhcp_auth_validate()
197 realm_len = dlen - (sizeof(secretid) + sizeof(hmac)); in dhcp_auth_validate()
327 memset(hmac, 0, sizeof(hmac)); in dhcp_auth_validate()
330 hmac_md5(mm, mlen, t->key, t->key_len, hmac); in dhcp_auth_validate()
339 if (memcmp(d, &hmac, dlen)) { in dhcp_auth_validate()
480 uint8_t hmac[HMAC_LENGTH]; in dhcp_auth_encode() local
553 dlen += sizeof(t->secretid) + sizeof(hmac); in dhcp_auth_encode()
656 hmac_md5(m, mlen, t->key, t->key_len, hmac); in dhcp_auth_encode()
[all …]
/external/syslinux/gpxe/src/crypto/
Dhmac.c99 void *key, size_t *key_len, void *hmac ) { in hmac_final() argument
115 digest_final ( digest, digest_ctx, hmac ); in hmac_final()
120 digest_update ( digest, digest_ctx, hmac, digest->digestsize ); in hmac_final()
121 digest_final ( digest, digest_ctx, hmac ); in hmac_final()
/external/python/cpython2/Doc/library/
Dhmac.rst1 :mod:`hmac` --- Keyed-Hashing for Message Authentication
4 .. module:: hmac
12 **Source code:** :source:`Lib/hmac.py`
21 Return a new hmac object. If *msg* is present, the method call ``update(msg)``
30 Update the hmac object with the string *msg*. Repeated calls are equivalent to
65 Return a copy ("clone") of the hmac object. This can be used to efficiently
/external/webrtc/webrtc/p2p/base/
Dstun.cc193 char hmac[kStunMessageIntegritySize]; in ValidateMessageIntegrity() local
197 hmac, sizeof(hmac)); in ValidateMessageIntegrity()
198 ASSERT(ret == sizeof(hmac)); in ValidateMessageIntegrity()
199 if (ret != sizeof(hmac)) in ValidateMessageIntegrity()
204 hmac, in ValidateMessageIntegrity()
205 sizeof(hmac)) == 0; in ValidateMessageIntegrity()
228 char hmac[kStunMessageIntegritySize]; in AddMessageIntegrity() local
232 hmac, sizeof(hmac)); in AddMessageIntegrity()
233 ASSERT(ret == sizeof(hmac)); in AddMessageIntegrity()
234 if (ret != sizeof(hmac)) { in AddMessageIntegrity()
[all …]
/external/openssh/
Dssh_config43 # MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
/external/wpa_supplicant_8/src/eap_common/
Deap_sim_common.c168 unsigned char hmac[SHA1_MAC_LEN]; in eap_sim_verify_mac() local
196 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac); in eap_sim_verify_mac()
198 hmac, EAP_SIM_MAC_LEN); in eap_sim_verify_mac()
201 return (os_memcmp_const(hmac, mac, EAP_SIM_MAC_LEN) == 0) ? 0 : 1; in eap_sim_verify_mac()
208 unsigned char hmac[SHA1_MAC_LEN]; in eap_sim_add_mac() local
224 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac); in eap_sim_add_mac()
225 os_memcpy(mac, hmac, EAP_SIM_MAC_LEN); in eap_sim_add_mac()
363 unsigned char hmac[SHA256_MAC_LEN]; in eap_sim_verify_mac_sha256() local
391 hmac_sha256_vector(k_aut, EAP_AKA_PRIME_K_AUT_LEN, 2, addr, len, hmac); in eap_sim_verify_mac_sha256()
393 hmac, EAP_SIM_MAC_LEN); in eap_sim_verify_mac_sha256()
[all …]
/external/tpm2/
DSessionProcess.c559 TPM2B_DIGEST *hmac // OUT: authorization HMAC in ComputeCommandHMAC() argument
638 hmac->t.size = 0; in ComputeCommandHMAC()
642 hmac->t.size = CryptStartHMAC2B(session->authHashAlg, &key.b, &hmacState); in ComputeCommandHMAC()
662 CryptCompleteHMAC2B(&hmacState, &hmac->b); in ComputeCommandHMAC()
686 TPM2B_DIGEST hmac; // authHMAC for comparing in CheckSessionHMAC() local
688 ComputeCommandHMAC(sessionIndex, cpHash, &hmac); in CheckSessionHMAC()
690 if(!Memory2BEqual(&s_inputAuthValues[sessionIndex].b, &hmac.b)) in CheckSessionHMAC()
1680 TPM2B_DIGEST *hmac // OUT: authHMAC in ComputeResponseHMAC() argument
1717 hmac->t.size = 0; in ComputeResponseHMAC()
1721 hmac->t.size = CryptStartHMAC2B(session->authHashAlg, &key.b, &hmacState); in ComputeResponseHMAC()
[all …]
/external/python/cpython2/Lib/multiprocessing/
Dconnection.py417 import hmac
421 digest = hmac.new(authkey, message).digest()
430 import hmac
435 digest = hmac.new(authkey, message).digest()
/external/kernel-headers/original/uapi/linux/
Dseg6_hmac.h13 __u8 hmac[SEG6_HMAC_FIELD_LEN]; member
/external/wpa_supplicant_8/src/crypto/
Dcrypto_libtomcrypt.c148 hmac_state hmac; member
174 if (hmac_init(&ctx->u.hmac, find_hash("md5"), key, key_len) != in crypto_hash_init()
179 if (hmac_init(&ctx->u.hmac, find_hash("sha1"), key, key_len) != in crypto_hash_init()
208 ctx->error = hmac_process(&ctx->u.hmac, data, len) != CRYPT_OK; in crypto_hash_update()
267 if (hmac_done(&ctx->u.hmac, mac, &clen) != CRYPT_OK) { in crypto_hash_finish()

123