/external/ganymed-ssh2/src/main/java/ch/ethz/ssh2/crypto/digest/ |
MAC.java | 22 return new String[]{"hmac-sha1-96", "hmac-sha1", "hmac-md5-96", "hmac-md5"}; 33 if (type.equals("hmac-sha1")) 35 if (type.equals("hmac-sha1-96")) 37 if (type.equals("hmac-md5")) 39 if (type.equals("hmac-md5-96")) 46 if (type.equals("hmac-sha1")) 48 mac = new HMAC(new SHA1(), key, 20) [all...] |
/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_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_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_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...] |
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/chromium/crypto/ |
hmac_mac.cc | 5 #include "crypto/hmac.h" 17 HMAC::HMAC(HashAlgorithm hash_alg) 23 bool HMAC::Init(const unsigned char *key, int key_length) { 25 // Init must not be called more than once on the same HMAC object. 35 HMAC::~HMAC() { 42 bool HMAC::Sign(const std::string& data,
|
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...] |
hmac.h | 5 // Utility class for calculating the HMAC for a given message. We currently 22 class HMAC { 30 explicit HMAC(HashAlgorithm hash_alg); 31 ~HMAC(); 44 // Calculates the HMAC for the message in |data| using the algorithm supplied 45 // to the constructor and the key supplied to the Init method. The HMAC is 55 DISALLOW_COPY_AND_ASSIGN(HMAC);
|
hmac_nss.cc | 5 #include "crypto/hmac.h" 23 HMAC::HMAC(HashAlgorithm hash_alg) 39 HMAC::~HMAC() { 42 bool HMAC::Init(const unsigned char *key, int key_length) { 46 // Init must not be called more than twice on the same HMAC object. 76 bool HMAC::Sign(const std::string& data,
|
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...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/digest/ |
DigestAlgorithmProvider.java | 16 String mainName = "HMAC" + algorithm; 19 provider.addAlgorithm("Alg.Alias.Mac.HMAC-" + algorithm, mainName); 20 provider.addAlgorithm("Alg.Alias.Mac.HMAC/" + algorithm, mainName); 22 provider.addAlgorithm("Alg.Alias.KeyGenerator.HMAC-" + algorithm, mainName); 23 provider.addAlgorithm("Alg.Alias.KeyGenerator.HMAC/" + algorithm, mainName); 31 String mainName = "HMAC" + algorithm;
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/generators/ |
PKCS5S2ParametersGenerator.java | 10 import org.bouncycastle.crypto.macs.HMac; 16 * This generator uses a SHA-1 HMac as the calculation function. 25 private Mac hMac; 39 hMac = new HMac(digest); 50 byte[] state = new byte[hMac.getMacSize()]; 53 hMac.init(param); 57 hMac.update(S, 0, S.length); 60 hMac.update(iBuf, 0, iBuf.length); 62 hMac.doFinal(state, 0) [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/ |
BaseMac.java | 37 import org.bouncycastle.crypto.macs.HMac; 255 // * MD2 HMac 262 // super(new HMac(new MD2Digest())); 267 // * MD4 HMac 274 // super(new HMac(new MD4Digest())); 280 * MD5 HMac 288 super(new HMac(AndroidDigestFactory.getMD5())); 294 * SHA1 HMac 302 super(new HMac(AndroidDigestFactory.getSHA1())); 309 // * SHA-224 HMac [all...] |
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/provider/ |
JCEMac.java | 38 import org.bouncycastle.crypto.macs.HMac; 240 // * MD2 HMac 247 // super(new HMac(new MD2Digest())); 252 // * MD4 HMac 259 // super(new HMac(new MD4Digest())); 265 * MD5 HMac 273 super(new HMac(AndroidDigestFactory.getMD5())); 279 * SHA1 HMac 287 super(new HMac(AndroidDigestFactory.getSHA1())); 294 // * SHA-224 HMac [all...] |
/external/openssh/regress/ |
cipher-speed.sh | 19 macs="hmac-sha1 hmac-md5 umac-64@openssh.com hmac-sha1-96 hmac-md5-96" 21 macs="$macs hmac-sha2-256 hmac-sha2-256-96 hmac-sha2-512 hmac-sha2-512-96"
|
try-ciphers.sh | 10 macs="hmac-sha1 hmac-md5 umac-64@openssh.com hmac-sha1-96 hmac-md5-96" 12 macs="$macs hmac-sha2-256 hmac-sha2-256-96 hmac-sha2-512 hmac-sha2-512-96"
|
/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/smack/src/org/xbill/DNS/utils/ |
HMAC.java | 9 * An implementation of the HMAC message authentication code. 14 public class HMAC { 46 * Creates a new HMAC instance 52 HMAC(MessageDigest digest, int blockLength, byte [] key) { 60 * Creates a new HMAC instance 66 HMAC(String digestName, int blockLength, byte [] key) { 78 * Creates a new HMAC instance 82 * use {@code HMAC(MessageDigest digest, int blockLength, 84 * @see HMAC#HMAC(MessageDigest digest, int blockLength, byte [] key [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_peap_common.c | 37 * T1 = HMAC-SHA1(K, S | 0x01 | 0x00 | 0x00) 38 * T2 = HMAC-SHA1(K, T1 | S | 0x02 | 0x00 | 0x00) 40 * Tn = HMAC-SHA1(K, Tn-1 | S | n | 0x00 | 0x00) 53 * T1 = HMAC-SHA1(K, S | LEN | 0x01) 54 * T2 = HMAC-SHA1 (K, T1 | S | LEN | 0x02) 55 * T3 = HMAC-SHA1 (K, T2 | S | LEN | 0x03) 56 * T4 = HMAC-SHA1 (K, T3 | S | LEN | 0x04)
|
/external/openssh/ |
myproposal.h | 80 "hmac-sha2-256," \ 81 "hmac-sha2-256-96," \ 82 "hmac-sha2-512," \ 83 "hmac-sha2-512-96," 88 "hmac-md5," \ 89 "hmac-sha1," \ 92 "hmac-ripemd160," \ 93 "hmac-ripemd160@openssh.com," \ 94 "hmac-sha1-96," \ 95 "hmac-md5-96 [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...] |