Lines Matching refs:ctx
38 EVP_MD_CTX *ctx;
44 ctx = EVP_MD_CTX_new();
45 if (ctx == NULL) {
51 if (!EVP_DigestInit_ex(ctx, EVP_sha1(), NULL)) {
56 EVP_DigestUpdate(ctx, (const unsigned char *)key, key_len);
57 EVP_DigestFinal_ex(ctx, ikey, &res_len);
71 if (!EVP_DigestInit_ex(ctx, EVP_sha1(), NULL)) {
76 EVP_DigestUpdate(ctx, (const unsigned char *)ikey, HMAC_SHA1_BLOCKSIZE);
77 EVP_DigestUpdate(ctx, (const unsigned char *)in, in_len);
78 EVP_DigestFinal_ex(ctx, hash, &res_len);
80 if (!EVP_DigestInit_ex(ctx, EVP_sha1(), NULL)) {
85 EVP_DigestUpdate(ctx, (const unsigned char *)okey, HMAC_SHA1_BLOCKSIZE);
86 EVP_DigestUpdate(ctx, (const unsigned char *)hash, SSS_SHA1_LENGTH);
87 EVP_DigestFinal_ex(ctx, out, &res_len);
90 EVP_MD_CTX_free(ctx);