/external/dropbear/libtomcrypt/src/mac/hmac/ |
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_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...] |
/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/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/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/dropbear/ |
packet.c | 267 /* check the hmac */ 318 hmac_state hmac; local 329 if (hmac_init(&hmac, 334 dropbear_exit("HMAC error"); 339 if (hmac_process(&hmac, tempbuf, 4) != CRYPT_OK) { 340 dropbear_exit("HMAC error"); 345 if (hmac_process(&hmac, buf_getptr(sourcebuf, len), len) != CRYPT_OK) { 346 dropbear_exit("HMAC error"); 350 if (hmac_done(&hmac, tempbuf, &bufsize) != CRYPT_OK) { 351 dropbear_exit("HMAC error") 526 hmac_state hmac; local [all...] |
/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/wpa_supplicant_8/src/eap_common/ |
eap_sim_common.c | 168 unsigned char hmac[SHA1_MAC_LEN]; local 187 /* HMAC-SHA1-128 */ 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(hmac, mac, EAP_SIM_MAC_LEN) == 0) ? 0 : 1; 208 unsigned char hmac[SHA1_MAC_LEN]; local 217 /* HMAC-SHA1-128 */ 224 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac); 225 os_memcpy(mac, hmac, EAP_SIM_MAC_LEN); 244 * T1 = HMAC-SHA-256 (K, S | 0x01 363 unsigned char hmac[SHA256_MAC_LEN]; local 403 unsigned char hmac[SHA256_MAC_LEN]; local [all...] |
/hardware/qcom/keymaster/ |
keymaster_qcom.h | 46 #define KM_HMAC_LENGTH (32) /* SHA2 will be used for HMAC */ 58 uint8_t hmac[KM_HMAC_LENGTH]; member in struct:qcom_km_key_blob
|
/external/chromium/chrome/common/extensions/docs/examples/apps/hello-python/oauth2/ |
__init__.py | 29 import hmac namespace 710 name = 'HMAC-SHA1' 732 # HMAC object. 738 hashed = hmac.new(key, raw, sha)
|
/external/wpa_supplicant_8/src/crypto/ |
crypto_libtomcrypt.c | 148 hmac_state hmac; member in union:crypto_hash::__anon18439 174 if (hmac_init(&ctx->u.hmac, find_hash("md5"), key, key_len) != 179 if (hmac_init(&ctx->u.hmac, find_hash("sha1"), key, key_len) != 208 ctx->error = hmac_process(&ctx->u.hmac, data, len) != CRYPT_OK; 267 if (hmac_done(&ctx->u.hmac, mac, &clen) != CRYPT_OK) {
|
/external/ganymed-ssh2/src/main/java/ch/ethz/ssh2/ |
KnownHosts.java | 24 import ch.ethz.ssh2.crypto.digest.HMAC; 184 HMAC hmac = new HMAC(sha1, salt, salt.length); local 186 hmac.update(StringEncoder.GetBytes(hostname)); 188 byte[] dig = new byte[hmac.getDigestLength()]; 190 hmac.digest(dig);
|
/external/openssl/ssl/ |
t1_enc.c | 144 #include <openssl/hmac.h> 554 /* Needed for "composite" AEADs, such as RC4-HMAC-MD5 */ 954 EVP_MD_CTX hmac, *mac_ctx; local 983 EVP_MD_CTX_copy(&hmac,hash); 984 mac_ctx = &hmac; 1042 EVP_MD_CTX_cleanup(&hmac); [all...] |
/external/chromium/chrome/common/extensions/docs/examples/apps/hello-python/httplib2/ |
__init__.py | 52 import hmac namespace 530 self.challenge['algorithm'] = self.challenge.get('algorithm', 'HMAC-SHA-1') 531 if self.challenge['algorithm'] not in ['HMAC-SHA-1', 'HMAC-MD5']: 536 if self.challenge['algorithm'] == 'HMAC-MD5': 558 request_digest = hmac.new(self.key, request_digest, self.hashmod).hexdigest().lower() [all...] |
/external/openssl/apps/ |
speed.c | 144 #include <openssl/hmac.h> 251 "md2","mdc2","md4","md5","hmac(md5)","sha1","rmd160","rc4", 387 unsigned char hmac[MD5_DIGEST_LENGTH]; local 798 if (strcmp(*argv,"hmac") == 0) doit[D_HMAC]=1; 1024 BIO_printf(bio_err,"hmac "); [all...] |