Lines Matching refs:key
40 * Start HMAC-SHA1 process. Initialize an sha1 context and digest the key.
43 isc_hmacsha1_init(isc_hmacsha1_t *ctx, const unsigned char *key,
49 memset(ctx->key, 0, sizeof(ctx->key));
50 if (len > sizeof(ctx->key)) {
53 isc_sha1_update(&sha1ctx, key, len);
54 isc_sha1_final(&sha1ctx, ctx->key);
56 memmove(ctx->key, key, len);
61 ipad[i] ^= ctx->key[i];
96 opad[i] ^= ctx->key[i];
121 * Start HMAC-SHA224 process. Initialize an sha224 context and digest the key.
124 isc_hmacsha224_init(isc_hmacsha224_t *ctx, const unsigned char *key,
130 memset(ctx->key, 0, sizeof(ctx->key));
131 if (len > sizeof(ctx->key)) {
134 isc_sha224_update(&sha224ctx, key, len);
135 isc_sha224_final(ctx->key, &sha224ctx);
137 memmove(ctx->key, key, len);
142 ipad[i] ^= ctx->key[i];
176 opad[i] ^= ctx->key[i];
200 * Start HMAC-SHA256 process. Initialize an sha256 context and digest the key.
203 isc_hmacsha256_init(isc_hmacsha256_t *ctx, const unsigned char *key,
209 memset(ctx->key, 0, sizeof(ctx->key));
210 if (len > sizeof(ctx->key)) {
213 isc_sha256_update(&sha256ctx, key, len);
214 isc_sha256_final(ctx->key, &sha256ctx);
216 memmove(ctx->key, key, len);
221 ipad[i] ^= ctx->key[i];
255 opad[i] ^= ctx->key[i];
279 * Start HMAC-SHA384 process. Initialize an sha384 context and digest the key.
282 isc_hmacsha384_init(isc_hmacsha384_t *ctx, const unsigned char *key,
288 memset(ctx->key, 0, sizeof(ctx->key));
289 if (len > sizeof(ctx->key)) {
292 isc_sha384_update(&sha384ctx, key, len);
293 isc_sha384_final(ctx->key, &sha384ctx);
295 memmove(ctx->key, key, len);
300 ipad[i] ^= ctx->key[i];
334 opad[i] ^= ctx->key[i];
358 * Start HMAC-SHA512 process. Initialize an sha512 context and digest the key.
361 isc_hmacsha512_init(isc_hmacsha512_t *ctx, const unsigned char *key,
367 memset(ctx->key, 0, sizeof(ctx->key));
368 if (len > sizeof(ctx->key)) {
371 isc_sha512_update(&sha512ctx, key, len);
372 isc_sha512_final(ctx->key, &sha512ctx);
374 memmove(ctx->key, key, len);
379 ipad[i] ^= ctx->key[i];
413 opad[i] ^= ctx->key[i];