Lines Matching refs:hash
70 clHASH_init(&ctx->hash);
71 clHASH_update(&ctx->hash, key, len);
72 memcpy(&ctx->opad[0], clHASH_final(&ctx->hash), clHASH_size(&ctx->hash));
81 clHASH_init(&ctx->hash);
82 clHASH_update(&ctx->hash, ctx->opad, sizeof(ctx->opad)); // hash ipad
91 memcpy(digest, clHASH_final(&ctx->hash), sizeof(digest));
92 clHASH_init(&ctx->hash);
93 clHASH_update(&ctx->hash, ctx->opad, sizeof(ctx->opad));
94 clHASH_update(&ctx->hash, digest, sizeof(digest));
96 return clHASH_final(&ctx->hash);
201 // as per openssl, RSA_PKCS1_PADDING, EVP_sha256() hash.
202 // At the location of the bytes of the hash all 00 are hashed.
233 clSHA256_init(&ctx->hash);
292 // as per openssl, RSA_PKCS1_PADDING, EVP_sha1() hash.
293 // At the location of the bytes of the hash all 00 are hashed.
319 clSHA1_init(&ctx->hash);
434 // Verify a 2048 bit RSA PKCS1.5 signature against an expected hash.
439 clHASH_CTX* hash) {
441 const uint8_t* digest = clHASH_final(hash);
452 for (i = len - clHASH_size(hash); i < len; ++i) {
457 clHASH_init(hash);
458 clHASH_update(hash, buf, len);
459 digest = clHASH_final(hash);
461 // This should equal hash of pkcs15 padding.
462 return clEqual(digest, clHASH_size(hash),
463 hash->f->_2Kpkcs15hashpad, clHASH_size(hash)) == 0;