Lines Matching refs:key

41 isc_hmacsha1_init(isc_hmacsha1_t *ctx, const unsigned char *key,
44 HMAC_Init(ctx, (const void *) key, (int) len, EVP_sha1());
72 isc_hmacsha224_init(isc_hmacsha224_t *ctx, const unsigned char *key,
75 HMAC_Init(ctx, (const void *) key, (int) len, EVP_sha224());
103 isc_hmacsha256_init(isc_hmacsha256_t *ctx, const unsigned char *key,
106 HMAC_Init(ctx, (const void *) key, (int) len, EVP_sha256());
134 isc_hmacsha384_init(isc_hmacsha384_t *ctx, const unsigned char *key,
137 HMAC_Init(ctx, (const void *) key, (int) len, EVP_sha384());
165 isc_hmacsha512_init(isc_hmacsha512_t *ctx, const unsigned char *key,
168 HMAC_Init(ctx, (const void *) key, (int) len, EVP_sha512());
201 * Start HMAC-SHA1 process. Initialize an sha1 context and digest the key.
204 isc_hmacsha1_init(isc_hmacsha1_t *ctx, const unsigned char *key,
210 memset(ctx->key, 0, sizeof(ctx->key));
211 if (len > sizeof(ctx->key)) {
214 isc_sha1_update(&sha1ctx, key, len);
215 isc_sha1_final(&sha1ctx, ctx->key);
217 memcpy(ctx->key, key, len);
222 ipad[i] ^= ctx->key[i];
229 memset(ctx->key, 0, sizeof(ctx->key));
258 opad[i] ^= ctx->key[i];
270 * Start HMAC-SHA224 process. Initialize an sha224 context and digest the key.
273 isc_hmacsha224_init(isc_hmacsha224_t *ctx, const unsigned char *key,
279 memset(ctx->key, 0, sizeof(ctx->key));
280 if (len > sizeof(ctx->key)) {
283 isc_sha224_update(&sha224ctx, key, len);
284 isc_sha224_final(ctx->key, &sha224ctx);
286 memcpy(ctx->key, key, len);
291 ipad[i] ^= ctx->key[i];
297 memset(ctx->key, 0, sizeof(ctx->key));
326 opad[i] ^= ctx->key[i];
337 * Start HMAC-SHA256 process. Initialize an sha256 context and digest the key.
340 isc_hmacsha256_init(isc_hmacsha256_t *ctx, const unsigned char *key,
346 memset(ctx->key, 0, sizeof(ctx->key));
347 if (len > sizeof(ctx->key)) {
350 isc_sha256_update(&sha256ctx, key, len);
351 isc_sha256_final(ctx->key, &sha256ctx);
353 memcpy(ctx->key, key, len);
358 ipad[i] ^= ctx->key[i];
364 memset(ctx->key, 0, sizeof(ctx->key));
393 opad[i] ^= ctx->key[i];
404 * Start HMAC-SHA384 process. Initialize an sha384 context and digest the key.
407 isc_hmacsha384_init(isc_hmacsha384_t *ctx, const unsigned char *key,
413 memset(ctx->key, 0, sizeof(ctx->key));
414 if (len > sizeof(ctx->key)) {
417 isc_sha384_update(&sha384ctx, key, len);
418 isc_sha384_final(ctx->key, &sha384ctx);
420 memcpy(ctx->key, key, len);
425 ipad[i] ^= ctx->key[i];
431 memset(ctx->key, 0, sizeof(ctx->key));
460 opad[i] ^= ctx->key[i];
471 * Start HMAC-SHA512 process. Initialize an sha512 context and digest the key.
474 isc_hmacsha512_init(isc_hmacsha512_t *ctx, const unsigned char *key,
480 memset(ctx->key, 0, sizeof(ctx->key));
481 if (len > sizeof(ctx->key)) {
484 isc_sha512_update(&sha512ctx, key, len);
485 isc_sha512_final(ctx->key, &sha512ctx);
487 memcpy(ctx->key, key, len);
492 ipad[i] ^= ctx->key[i];
498 memset(ctx->key, 0, sizeof(ctx->key));
527 opad[i] ^= ctx->key[i];