Searched refs:hmac (Results 1 - 25 of 110) sorted by relevance

12345

/external/chromium_org/crypto/
H A Dhmac_unittest.cc7 #include "crypto/hmac.h"
77 crypto::HMAC hmac(crypto::HMAC::SHA1);
78 ASSERT_TRUE(hmac.Init(kClientKey, kKeySize));
81 EXPECT_TRUE(hmac.Sign(message_data, calculated_hmac, kSHA1DigestSize));
146 crypto::HMAC hmac(crypto::HMAC::SHA1);
147 ASSERT_TRUE(hmac.Init(reinterpret_cast<const unsigned char*>(cases[i].key),
151 EXPECT_TRUE(hmac.Sign(data_string, digest, kSHA1DigestSize));
172 crypto::HMAC hmac(crypto::HMAC::SHA256);
173 ASSERT_TRUE(hmac.Init(key, sizeof(key)));
176 EXPECT_EQ(kSHA256DigestSize, hmac
[all...]
H A Dhkdf.cc9 #include "crypto/hmac.h"
58 HMAC hmac(HMAC::SHA256);
59 result = hmac.Init(prk, sizeof(prk));
69 result = hmac.Sign(base::StringPiece(buf.get(), j), digest, sizeof(digest));
H A Dhmac_openssl.cc5 #include "crypto/hmac.h"
7 #include <openssl/hmac.h>
/external/chromium_org/content/public/browser/
H A Dmedia_device_id.cc11 #include "crypto/hmac.h"
20 crypto::HMAC hmac(crypto::HMAC::SHA256);
21 const size_t digest_length = hmac.DigestLength();
24 bool result = hmac.Init(security_origin.spec()) &&
25 hmac.Sign(raw_unique_id + salt, &digest[0], digest.size());
/external/chromium_org/chrome/browser/prefs/
H A Dpref_hash_calculator.cc15 #include "crypto/hmac.h"
22 crypto::HMAC hmac(crypto::HMAC::SHA256);
23 std::vector<uint8> digest(hmac.DigestLength());
24 if (!hmac.Init(key) || !hmac.Sign(message, &digest[0], digest.size())) {
36 crypto::HMAC hmac(crypto::HMAC::SHA256);
39 hmac.Init(key) &&
40 hmac.Verify(message,
/external/openssl/crypto/pkcs12/
H A Dp12_mutl.c62 #include <openssl/hmac.h>
71 HMAC_CTX hmac; local
99 HMAC_CTX_init(&hmac);
100 if (!HMAC_Init_ex(&hmac, key, md_size, md_type, NULL)
101 || !HMAC_Update(&hmac, p12->authsafes->d.data->data,
103 || !HMAC_Final(&hmac, mac, maclen))
105 HMAC_CTX_cleanup(&hmac);
108 HMAC_CTX_cleanup(&hmac);
/external/wpa_supplicant_8/hostapd/src/tls/
H A Dtlsv1_record.c155 struct crypto_hash *hmac; local
207 hmac = crypto_hash_init(rl->hash_alg, rl->write_mac_secret,
209 if (hmac == NULL) {
214 crypto_hash_update(hmac, rl->write_seq_num, TLS_SEQ_NUM_LEN);
216 crypto_hash_update(hmac, ct_start, TLS_RECORD_HEADER_LEN);
217 crypto_hash_update(hmac, payload, payload_len);
222 crypto_hash_finish(hmac, NULL, NULL);
226 if (crypto_hash_finish(hmac, pos, &clen) < 0) {
284 struct crypto_hash *hmac; local
436 hmac
[all...]
/external/wpa_supplicant_8/src/tls/
H A Dtlsv1_record.c155 struct crypto_hash *hmac; local
207 hmac = crypto_hash_init(rl->hash_alg, rl->write_mac_secret,
209 if (hmac == NULL) {
214 crypto_hash_update(hmac, rl->write_seq_num, TLS_SEQ_NUM_LEN);
216 crypto_hash_update(hmac, ct_start, TLS_RECORD_HEADER_LEN);
217 crypto_hash_update(hmac, payload, payload_len);
222 crypto_hash_finish(hmac, NULL, NULL);
226 if (crypto_hash_finish(hmac, pos, &clen) < 0) {
284 struct crypto_hash *hmac; local
436 hmac
[all...]
/external/wpa_supplicant_8/wpa_supplicant/src/tls/
H A Dtlsv1_record.c155 struct crypto_hash *hmac; local
207 hmac = crypto_hash_init(rl->hash_alg, rl->write_mac_secret,
209 if (hmac == NULL) {
214 crypto_hash_update(hmac, rl->write_seq_num, TLS_SEQ_NUM_LEN);
216 crypto_hash_update(hmac, ct_start, TLS_RECORD_HEADER_LEN);
217 crypto_hash_update(hmac, payload, payload_len);
222 crypto_hash_finish(hmac, NULL, NULL);
226 if (crypto_hash_finish(hmac, pos, &clen) < 0) {
284 struct crypto_hash *hmac; local
436 hmac
[all...]
/external/smack/src/org/xbill/DNS/
H A DTSIG.java19 private static final String HMAC_SHA1_STR = "hmac-sha1.";
20 private static final String HMAC_SHA224_STR = "hmac-sha224.";
21 private static final String HMAC_SHA256_STR = "hmac-sha256.";
22 private static final String HMAC_SHA384_STR = "hmac-sha384.";
23 private static final String HMAC_SHA512_STR = "hmac-sha512.";
100 * Creates a new TSIG key with the hmac-md5 algorithm, which can be used to
136 * "hmac-md5", "hmac-sha1", "hmac-sha224", "hmac
[all...]
/external/chromium_org/third_party/libsrtp/srtp/crypto/hash/
H A Dhmac.c2 * hmac.c
4 * implementation of hmac auth_type_t
45 #include "hmac.h"
52 "hmac sha-1" /* printable name for module */
58 extern auth_type_t hmac;
82 (*a)->type = &hmac;
88 /* increment global count of all hmac uses */
89 hmac.ref_count++;
96 extern auth_type_t hmac;
105 /* decrement global count of all hmac use
255 hmac = { variable
[all...]
/external/srtp/crypto/hash/
H A Dhmac.c2 * hmac.c
4 * implementation of hmac auth_type_t
45 #include "hmac.h"
52 "hmac sha-1" /* printable name for module */
58 extern auth_type_t hmac;
82 (*a)->type = &hmac;
88 /* increment global count of all hmac uses */
89 hmac.ref_count++;
96 extern auth_type_t hmac;
105 /* decrement global count of all hmac use
255 hmac = { variable
[all...]
/external/chromium_org/sync/util/
H A Dnigori.cc15 #include "crypto/hmac.h"
141 HMAC hmac(HMAC::SHA256);
142 if (!hmac.Init(raw_mac_key))
146 if (!hmac.Sign(ciphertext, &hash[0], hash.size()))
177 HMAC hmac(HMAC::SHA256);
178 if (!hmac.Init(raw_mac_key))
182 if (!hmac.Sign(ciphertext, &hash[0], hash.size()))
215 HMAC hmac(HMAC::SHA256);
216 if (!hmac.Init(raw_mac_key))
220 if (!hmac
[all...]
/external/chromium_org/chrome/browser/extensions/api/webrtc_audio_private/
H A Dwebrtc_audio_private_api.h88 virtual void OnHMACCalculated(const std::string& hmac);
140 virtual void OnHMACCalculated(const std::string& hmac) OVERRIDE;
218 virtual void OnHMACCalculated(const std::string& hmac) OVERRIDE;
/external/chromium_org/components/rappor/
H A Dbyte_vector_utils.cc29 // The input "K" is passed by initializing |hmac| with it.
32 bool HMAC_Rotate(const crypto::HMAC& hmac, argument
35 ByteVector key(hmac.DigestLength());
36 if (!hmac.Sign(data, &key[0], key.size()))
42 // The input "K" is passed by initializing |hmac| with it.
45 bool HMAC_Rehash(const crypto::HMAC& hmac, ByteVector* value) { argument
46 return hmac.Sign(ByteVectorAsStringPiece(*value),
/external/chromium_org/chrome/browser/extensions/api/music_manager_private/
H A Ddevice_id.cc11 #include "crypto/hmac.h"
21 crypto::HMAC hmac(crypto::HMAC::SHA256);
22 const size_t digest_length = hmac.DigestLength();
24 bool result = hmac.Init(key) &&
25 hmac.Sign(text, &digest[0], digest.size());
/external/chromium_org/third_party/libjingle/source/talk/p2p/base/
H A Dstun.cc211 char hmac[kStunMessageIntegritySize]; local
215 hmac, sizeof(hmac));
216 ASSERT(ret == sizeof(hmac));
217 if (ret != sizeof(hmac))
222 hmac,
223 sizeof(hmac)) == 0;
246 char hmac[kStunMessageIntegritySize]; local
250 hmac, sizeof(hmac));
[all...]
/external/wpa_supplicant_8/hostapd/src/eap_common/
H A Deap_sim_common.c168 unsigned char hmac[SHA1_MAC_LEN]; local
196 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac);
198 hmac, EAP_SIM_MAC_LEN);
201 return (os_memcmp_const(hmac, mac, EAP_SIM_MAC_LEN) == 0) ? 0 : 1;
208 unsigned char hmac[SHA1_MAC_LEN]; local
224 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac);
225 os_memcpy(mac, hmac, EAP_SIM_MAC_LEN);
363 unsigned char hmac[SHA256_MAC_LEN]; local
391 hmac_sha256_vector(k_aut, EAP_AKA_PRIME_K_AUT_LEN, 2, addr, len, hmac);
393 hmac, EAP_SIM_MAC_LE
403 unsigned char hmac[SHA256_MAC_LEN]; local
[all...]
/external/wpa_supplicant_8/src/eap_common/
H A Deap_sim_common.c168 unsigned char hmac[SHA1_MAC_LEN]; local
196 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac);
198 hmac, EAP_SIM_MAC_LEN);
201 return (os_memcmp_const(hmac, mac, EAP_SIM_MAC_LEN) == 0) ? 0 : 1;
208 unsigned char hmac[SHA1_MAC_LEN]; local
224 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac);
225 os_memcpy(mac, hmac, EAP_SIM_MAC_LEN);
363 unsigned char hmac[SHA256_MAC_LEN]; local
391 hmac_sha256_vector(k_aut, EAP_AKA_PRIME_K_AUT_LEN, 2, addr, len, hmac);
393 hmac, EAP_SIM_MAC_LE
403 unsigned char hmac[SHA256_MAC_LEN]; local
[all...]
/external/wpa_supplicant_8/wpa_supplicant/src/eap_common/
H A Deap_sim_common.c168 unsigned char hmac[SHA1_MAC_LEN]; local
196 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac);
198 hmac, EAP_SIM_MAC_LEN);
201 return (os_memcmp_const(hmac, mac, EAP_SIM_MAC_LEN) == 0) ? 0 : 1;
208 unsigned char hmac[SHA1_MAC_LEN]; local
224 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac);
225 os_memcpy(mac, hmac, EAP_SIM_MAC_LEN);
363 unsigned char hmac[SHA256_MAC_LEN]; local
391 hmac_sha256_vector(k_aut, EAP_AKA_PRIME_K_AUT_LEN, 2, addr, len, hmac);
393 hmac, EAP_SIM_MAC_LE
403 unsigned char hmac[SHA256_MAC_LEN]; local
[all...]
/external/srtp/
H A DAndroid.mk16 crypto/hash/hmac.c \
/external/chromium_org/third_party/tlslite/tlslite/utils/
H A Dcryptomath.py66 import hmac namespace
78 return bytearray(hmac.new(k, b, hashlib.md5).digest())
83 return bytearray(hmac.new(k, b, hashlib.sha1).digest())
/external/chromium_org/chrome/browser/chromeos/login/supervised/
H A Dsupervised_user_authentication.cc22 #include "crypto/hmac.h"
308 crypto::HMAC hmac(crypto::HMAC::SHA256);
309 if (!hmac.Init(signature_key))
313 if (!hmac.Sign(buffer, out_bytes, sizeof(out_bytes)))
/external/chromium_org/content/browser/renderer_host/p2p/
H A Dsocket_host.cc14 #include "crypto/hmac.h"
179 crypto::HMAC hmac(crypto::HMAC::SHA1);
180 if (!hmac.Init(reinterpret_cast<const unsigned char*>(
187 if (tag_length > hmac.DigestLength()) {
203 if (!hmac.Sign(base::StringPiece(rtp, auth_required_length),
/external/chromium_org/google_apis/gaia/
H A Doauth_request_signer.cc22 #include "crypto/hmac.h"
203 crypto::HMAC hmac(crypto::HMAC::SHA1);
204 DCHECK(hmac.DigestLength() == kHmacDigestLength);
206 bool result = hmac.Init(key) &&
207 hmac.Sign(text, digest, kHmacDigestLength);

Completed in 729 milliseconds

12345