/external/dropbear/libtomcrypt/src/mac/hmac/ |
hmac_process.c | 15 HMAC support, process data, Tom St Denis/Dobes Vandermeer 21 Process data through HMAC 22 @param hmac The hmac state 23 @param in The data to send through HMAC 24 @param inlen The length of the data to HMAC (octets) 27 int hmac_process(hmac_state *hmac, const unsigned char *in, unsigned long inlen) 30 LTC_ARGCHK(hmac != NULL); 32 if ((err = hash_is_valid(hmac->hash)) != CRYPT_OK) { 35 return hash_descriptor[hmac->hash].process(&hmac->md, in, inlen) [all...] |
hmac_memory.c | 15 HMAC support, process a block of memory, Tom St Denis/Dobes Vandermeer 21 HMAC a block of memory to produce the authentication tag 25 @param in The data to HMAC 26 @param inlen The length of the data to HMAC (octets) 36 hmac_state *hmac; local 54 /* nope, so call the hmac functions */ 55 /* allocate ram for hmac state */ 56 hmac = XMALLOC(sizeof(hmac_state)); 57 if (hmac == NULL) { 61 if ((err = hmac_init(hmac, hash, key, keylen)) != CRYPT_OK) [all...] |
hmac_init.c | 15 HMAC support, initialize state, Tom St Denis/Dobes Vandermeer 23 Initialize an HMAC context. 24 @param hmac The HMAC state 30 int hmac_init(hmac_state *hmac, int hash, const unsigned char *key, unsigned long keylen) 37 LTC_ARGCHK(hmac != NULL); 44 hmac->hash = hash; 59 hmac->key = XMALLOC(HMAC_BLOCKSIZE); 60 if (hmac->key == NULL) { 68 if ((err = hash_memory(hash, key, keylen, hmac->key, &z)) != CRYPT_OK) [all...] |
hmac_done.c | 15 HMAC support, terminate stream, Tom St Denis/Dobes Vandermeer 23 Terminate an HMAC session 24 @param hmac The HMAC state 25 @param out [out] The destination of the HMAC authentication tag 26 @param outlen [in/out] The max size and resulting size of the HMAC authentication tag 29 int hmac_done(hmac_state *hmac, unsigned char *out, unsigned long *outlen) 35 LTC_ARGCHK(hmac != NULL); 39 hash = hmac->hash; 60 /* Get the hash of the first HMAC vector plus the data * [all...] |
hmac_memory_multi.c | 16 HMAC support, process multiple blocks of memory, Tom St Denis/Dobes Vandermeer 22 HMAC multiple blocks of memory to produce the authentication tag 28 @param in The data to HMAC 29 @param inlen The length of the data to HMAC (octets) 30 @param ... tuples of (data,len) pairs to HMAC, terminated with a (NULL,x) (x=don't care) 39 hmac_state *hmac; local 50 /* allocate ram for hmac state */ 51 hmac = XMALLOC(sizeof(hmac_state)); 52 if (hmac == NULL) { 56 if ((err = hmac_init(hmac, hash, key, keylen)) != CRYPT_OK) [all...] |
hmac_file.c | 15 HMAC support, process a file, Tom St Denis/Dobes Vandermeer 21 HMAC a file 23 @param fname The name of the file you wish to HMAC 26 @param out [out] The HMAC authentication tag 37 hmac_state hmac; 52 if ((err = hmac_init(&hmac, hash, key, keylen)) != CRYPT_OK) { 64 if ((err = hmac_process(&hmac, buf, (unsigned long)x)) != CRYPT_OK) { 75 /* get final hmac */ 76 if ((err = hmac_done(&hmac, out, outlen)) != CRYPT_OK) { 91 /* $Source: /cvs/libtom/libtomcrypt/src/mac/hmac/hmac_file.c,v $ * [all...] |
/external/dropbear/libtomcrypt/src/misc/pkcs5/ |
pkcs_5_2.c | 40 hmac_state *hmac; local 53 hmac = XMALLOC(sizeof(hmac_state)); 54 if (hmac == NULL || buf[0] == NULL) { 55 if (hmac != NULL) { 56 XFREE(hmac); 78 if ((err = hmac_init(hmac, hash_idx, password, password_len)) != CRYPT_OK) { 81 if ((err = hmac_process(hmac, salt, salt_len)) != CRYPT_OK) { 84 if ((err = hmac_process(hmac, buf[1], 4)) != CRYPT_OK) { 88 if ((err = hmac_done(hmac, buf[0], &x)) != CRYPT_OK) { 115 zeromem(hmac, sizeof(hmac_state)) [all...] |
/external/chromium_org/crypto/ |
hmac_unittest.cc | 7 #include "crypto/hmac.h" 43 // Expected HMAC result using kMessage and kClientKey. 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) [all...] |
hkdf.cc | 8 #include "crypto/hmac.h" 30 HMAC prk_hmac(HMAC::SHA256); 55 HMAC hmac(HMAC::SHA256); 56 result = hmac.Init(prk, sizeof(prk)); 66 result = hmac.Sign(base::StringPiece(buf.get(), j), digest, sizeof(digest));
|
/external/chromium_org/content/public/browser/ |
media_device_id.cc | 9 #include "crypto/hmac.h" 18 crypto::HMAC hmac(crypto::HMAC::SHA256); 19 const size_t digest_length = hmac.DigestLength(); 22 bool result = hmac.Init(security_origin.spec()) && 23 hmac.Sign(raw_unique_id + salt, &digest[0], digest.size());
|
/external/chromium/crypto/ |
hmac_unittest.cc | 7 #include "crypto/hmac.h" 21 // Expected HMAC result using kMessage and kClientKey. 55 crypto::HMAC hmac(crypto::HMAC::SHA1); 56 ASSERT_TRUE(hmac.Init(kClientKey, kKeySize)); 59 EXPECT_TRUE(hmac.Sign(message_data, calculated_hmac, kSHA1DigestSize)); 124 crypto::HMAC hmac(crypto::HMAC::SHA1) [all...] |
hmac_openssl.cc | 5 #include "crypto/hmac.h" 7 #include <openssl/hmac.h> 23 HMAC::HMAC(HashAlgorithm hash_alg) 29 bool HMAC::Init(const unsigned char* key, int key_length) { 30 // Init must not be called more than once on the same HMAC object. 37 HMAC::~HMAC() { 43 bool HMAC::Sign(const std::string& data, 50 return ::HMAC(hash_alg_ == SHA1 ? EVP_sha1() : EVP_sha256() [all...] |
/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/test/ |
test_hmac.py | 1 import hmac namespace 10 # Test the HMAC module against test vectors from the RFC. 13 h = hmac.HMAC(key, data) 47 h = hmac.HMAC(key, data, digestmod=hashlib.sha1) 81 h = hmac.HMAC(key, data, digestmod=hashfunc) 176 'd by the HMAC algorithm.', 217 hmac.HMAC('a', 'b', digestmod=MockCrazyHash [all...] |
test_pep247.py | 12 import hmac namespace 68 self.check_module(hmac, key='abc')
|
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/test/ |
test_hmac.py | 1 import hmac namespace 10 # Test the HMAC module against test vectors from the RFC. 13 h = hmac.HMAC(key, data) 47 h = hmac.HMAC(key, data, digestmod=hashlib.sha1) 81 h = hmac.HMAC(key, data, digestmod=hashfunc) 176 'd by the HMAC algorithm.', 217 hmac.HMAC('a', 'b', digestmod=MockCrazyHash [all...] |
test_pep247.py | 12 import hmac namespace 68 self.check_module(hmac, key='abc')
|
/external/chromium_org/third_party/openssl/openssl/crypto/pkcs12/ |
p12_mutl.c | 62 #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/openssl/crypto/pkcs12/ |
p12_mutl.c | 62 #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/src/tls/ |
tlsv1_record.c | 140 * header, IV (TLS v1.1), and HMAC) 147 * This function fills in the TLS record layer header, adds HMAC, and encrypts 155 struct crypto_hash *hmac; local 207 hmac = crypto_hash_init(rl->hash_alg, rl->write_mac_secret, 209 if (hmac == NULL) { 211 "to initialize HMAC"); 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) 284 struct crypto_hash *hmac; local [all...] |
/external/smack/src/org/xbill/DNS/ |
TSIG.java | 18 private static final String HMAC_MD5_STR = "HMAC-MD5.SIG-ALG.REG.INT."; 19 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."; 25 /** The domain name representing the HMAC-MD5 algorithm. */ 28 /** The domain name representing the HMAC-MD5 algorithm (deprecated). */ 29 public static final Name HMAC = HMAC_MD5; 31 /** The domain name representing the HMAC-SHA1 algorithm. * 218 HMAC hmac = null; local 315 HMAC hmac = new HMAC(digest, digestBlockLength, key); local 367 HMAC hmac = new HMAC(digest, digestBlockLength, key); local [all...] |
/external/srtp/crypto/hash/ |
hmac.c | 2 * 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 uses * 255 hmac = { variable [all...] |
/external/chromium/chrome/browser/sync/util/ |
nigori.cc | 21 #include "crypto/hmac.h" 27 using crypto::HMAC; 146 HMAC hmac(HMAC::SHA256); 147 if (!hmac.Init(raw_mac_key)) 151 if (!hmac.Sign(ciphertext, &hash[0], hash.size())) 187 HMAC hmac(HMAC::SHA256) [all...] |
/external/chromium_org/sync/util/ |
nigori.cc | 15 #include "crypto/hmac.h" 22 using crypto::HMAC; 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) [all...] |
/external/chromium_org/google_apis/cup/ |
client_update_protocol.cc | 13 #include "crypto/hmac.h" 26 // Google Update server; for now, this is SHA-1 and HMAC-SHA1, but this may 73 crypto::HMAC hmac(crypto::HMAC::SHA1); 74 if (!hmac.Init(&key[0], key.size())) 77 std::vector<uint8> result(hmac.DigestLength()); 78 if (!hmac.Sign(ByteVectorToSP(hashes), &result[0], result.size())) 91 crypto::HMAC hmac(crypto::HMAC::SHA1) [all...] |
/external/chromium_org/chrome/browser/extensions/api/music_manager_private/ |
device_id.cc | 11 #include "crypto/hmac.h" 17 // Compute HMAC-SHA256(|key|, |text|) as a string. 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()); 45 DLOG(ERROR) << "Error while computing HMAC-SHA256 of device id."; 185 // Forward call to platform specific implementation, then compute the HMAC [all...] |