Lines Matching defs:key
18 * @key: Key for HMAC operations
19 * @key_len: Length of the key in bytes
26 int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem,
29 unsigned char k_pad[64]; /* padding - key XORd with ipad/opad */
42 /* if key is longer than 64 bytes reset it to key = SHA256(key) */
44 if (sha256_vector(1, &key, &key_len, tk) < 0)
46 key = tk;
54 * where K is an n byte key
59 /* start out by storing key in ipad */
61 os_memcpy(k_pad, key, key_len);
62 /* XOR key with ipad values */
77 os_memcpy(k_pad, key, key_len);
78 /* XOR key with opad values */
93 * @key: Key for HMAC operations
94 * @key_len: Length of the key in bytes
100 int hmac_sha256(const u8 *key, size_t key_len, const u8 *data,
103 return hmac_sha256_vector(key, key_len, 1, &data, &data_len, mac);