Lines Matching refs:mctx

20 int ossl_md5_sha1_init(MD5_SHA1_CTX *mctx)  in ossl_md5_sha1_init()  argument
22 if (!MD5_Init(&mctx->md5)) in ossl_md5_sha1_init()
24 return SHA1_Init(&mctx->sha1); in ossl_md5_sha1_init()
27 int ossl_md5_sha1_update(MD5_SHA1_CTX *mctx, const void *data, size_t count) in ossl_md5_sha1_update() argument
29 if (!MD5_Update(&mctx->md5, data, count)) in ossl_md5_sha1_update()
31 return SHA1_Update(&mctx->sha1, data, count); in ossl_md5_sha1_update()
34 int ossl_md5_sha1_final(unsigned char *md, MD5_SHA1_CTX *mctx) in ossl_md5_sha1_final() argument
36 if (!MD5_Final(md, &mctx->md5)) in ossl_md5_sha1_final()
38 return SHA1_Final(md + MD5_DIGEST_LENGTH, &mctx->sha1); in ossl_md5_sha1_final()
41 int ossl_md5_sha1_ctrl(MD5_SHA1_CTX *mctx, int cmd, int mslen, void *ms) in ossl_md5_sha1_ctrl() argument
50 if (mctx == NULL) in ossl_md5_sha1_ctrl()
61 if (ossl_md5_sha1_update(mctx, ms, mslen) <= 0) in ossl_md5_sha1_ctrl()
67 if (!MD5_Update(&mctx->md5, padtmp, sizeof(padtmp))) in ossl_md5_sha1_ctrl()
70 if (!MD5_Final(md5tmp, &mctx->md5)) in ossl_md5_sha1_ctrl()
73 if (!SHA1_Update(&mctx->sha1, padtmp, 40)) in ossl_md5_sha1_ctrl()
76 if (!SHA1_Final(sha1tmp, &mctx->sha1)) in ossl_md5_sha1_ctrl()
81 if (!ossl_md5_sha1_init(mctx)) in ossl_md5_sha1_ctrl()
84 if (ossl_md5_sha1_update(mctx, ms, mslen) <= 0) in ossl_md5_sha1_ctrl()
90 if (!MD5_Update(&mctx->md5, padtmp, sizeof(padtmp))) in ossl_md5_sha1_ctrl()
93 if (!MD5_Update(&mctx->md5, md5tmp, sizeof(md5tmp))) in ossl_md5_sha1_ctrl()
96 if (!SHA1_Update(&mctx->sha1, padtmp, 40)) in ossl_md5_sha1_ctrl()
99 if (!SHA1_Update(&mctx->sha1, sha1tmp, sizeof(sha1tmp))) in ossl_md5_sha1_ctrl()