Lines Matching refs:keylen
24 static void hash_key(struct crypto_tfm *tfm, u8 *key, unsigned int keylen) in hash_key() argument
30 tmp.length = keylen; in hash_key()
56 void crypto_hmac_init(struct crypto_tfm *tfm, u8 *key, unsigned int *keylen) in crypto_hmac_init() argument
62 if (*keylen > crypto_tfm_alg_blocksize(tfm)) { in crypto_hmac_init()
63 hash_key(tfm, key, *keylen); in crypto_hmac_init()
64 *keylen = crypto_tfm_alg_digestsize(tfm); in crypto_hmac_init()
68 memcpy(ipad, key, *keylen); in crypto_hmac_init()
88 unsigned int *keylen, u8 *out) in crypto_hmac_final() argument
94 if (*keylen > crypto_tfm_alg_blocksize(tfm)) { in crypto_hmac_final()
95 hash_key(tfm, key, *keylen); in crypto_hmac_final()
96 *keylen = crypto_tfm_alg_digestsize(tfm); in crypto_hmac_final()
102 memcpy(opad, key, *keylen); in crypto_hmac_final()
122 void crypto_hmac(struct crypto_tfm *tfm, u8 *key, unsigned int *keylen, in crypto_hmac() argument
125 crypto_hmac_init(tfm, key, keylen); in crypto_hmac()
127 crypto_hmac_final(tfm, key, keylen, out); in crypto_hmac()