Lines Matching full:md

66 static int digest_md5_final(EVP_MD_CTX *ctx, unsigned char *md);
72 EVP_MD *md; in digest_md5() local
74 if ((md = EVP_MD_meth_new(NID_md5, NID_md5WithRSAEncryption)) == NULL in digest_md5()
75 || !EVP_MD_meth_set_result_size(md, MD5_DIGEST_LENGTH) in digest_md5()
76 || !EVP_MD_meth_set_input_blocksize(md, MD5_CBLOCK) in digest_md5()
77 || !EVP_MD_meth_set_app_datasize(md, in digest_md5()
79 || !EVP_MD_meth_set_flags(md, 0) in digest_md5()
80 || !EVP_MD_meth_set_init(md, digest_md5_init) in digest_md5()
81 || !EVP_MD_meth_set_update(md, digest_md5_update) in digest_md5()
82 || !EVP_MD_meth_set_final(md, digest_md5_final)) { in digest_md5()
83 EVP_MD_meth_free(md); in digest_md5()
84 md = NULL; in digest_md5()
86 _hidden_md5_md = md; in digest_md5()
95 static int digest_sha1_final(EVP_MD_CTX *ctx, unsigned char *md);
101 EVP_MD *md; in digest_sha1() local
103 if ((md = EVP_MD_meth_new(NID_sha1, NID_sha1WithRSAEncryption)) == NULL in digest_sha1()
104 || !EVP_MD_meth_set_result_size(md, SHA_DIGEST_LENGTH) in digest_sha1()
105 || !EVP_MD_meth_set_input_blocksize(md, SHA_CBLOCK) in digest_sha1()
106 || !EVP_MD_meth_set_app_datasize(md, in digest_sha1()
108 || !EVP_MD_meth_set_flags(md, EVP_MD_FLAG_DIGALGID_ABSENT) in digest_sha1()
109 || !EVP_MD_meth_set_init(md, digest_sha1_init) in digest_sha1()
110 || !EVP_MD_meth_set_update(md, digest_sha1_update) in digest_sha1()
111 || !EVP_MD_meth_set_final(md, digest_sha1_final)) { in digest_sha1()
112 EVP_MD_meth_free(md); in digest_sha1()
113 md = NULL; in digest_sha1()
115 _hidden_sha1_md = md; in digest_sha1()
124 static int digest_sha256_final(EVP_MD_CTX *ctx, unsigned char *md);
130 EVP_MD *md; in digest_sha256() local
132 if ((md = EVP_MD_meth_new(NID_sha256, NID_sha256WithRSAEncryption)) == NULL in digest_sha256()
133 || !EVP_MD_meth_set_result_size(md, SHA256_DIGEST_LENGTH) in digest_sha256()
134 || !EVP_MD_meth_set_input_blocksize(md, SHA256_CBLOCK) in digest_sha256()
135 || !EVP_MD_meth_set_app_datasize(md, in digest_sha256()
137 || !EVP_MD_meth_set_flags(md, EVP_MD_FLAG_DIGALGID_ABSENT) in digest_sha256()
138 || !EVP_MD_meth_set_init(md, digest_sha256_init) in digest_sha256()
139 || !EVP_MD_meth_set_update(md, digest_sha256_update) in digest_sha256()
140 || !EVP_MD_meth_set_final(md, digest_sha256_final)) { in digest_sha256()
141 EVP_MD_meth_free(md); in digest_sha256()
142 md = NULL; in digest_sha256()
144 _hidden_sha256_md = md; in digest_sha256()
153 static int digest_sha384_final(EVP_MD_CTX *ctx, unsigned char *md);
158 static int digest_sha512_final(EVP_MD_CTX *ctx, unsigned char *md);
164 EVP_MD *md; in digest_sha384() local
166 if ((md = EVP_MD_meth_new(NID_sha384, NID_sha384WithRSAEncryption)) == NULL in digest_sha384()
167 || !EVP_MD_meth_set_result_size(md, SHA384_DIGEST_LENGTH) in digest_sha384()
168 || !EVP_MD_meth_set_input_blocksize(md, SHA512_CBLOCK) in digest_sha384()
169 || !EVP_MD_meth_set_app_datasize(md, in digest_sha384()
171 || !EVP_MD_meth_set_flags(md, EVP_MD_FLAG_DIGALGID_ABSENT) in digest_sha384()
172 || !EVP_MD_meth_set_init(md, digest_sha384_init) in digest_sha384()
173 || !EVP_MD_meth_set_update(md, digest_sha384_update) in digest_sha384()
174 || !EVP_MD_meth_set_final(md, digest_sha384_final)) { in digest_sha384()
175 EVP_MD_meth_free(md); in digest_sha384()
176 md = NULL; in digest_sha384()
178 _hidden_sha384_md = md; in digest_sha384()
186 EVP_MD *md; in digest_sha512() local
188 if ((md = EVP_MD_meth_new(NID_sha512, NID_sha512WithRSAEncryption)) == NULL in digest_sha512()
189 || !EVP_MD_meth_set_result_size(md, SHA512_DIGEST_LENGTH) in digest_sha512()
190 || !EVP_MD_meth_set_input_blocksize(md, SHA512_CBLOCK) in digest_sha512()
191 || !EVP_MD_meth_set_app_datasize(md, in digest_sha512()
193 || !EVP_MD_meth_set_flags(md, EVP_MD_FLAG_DIGALGID_ABSENT) in digest_sha512()
194 || !EVP_MD_meth_set_init(md, digest_sha512_init) in digest_sha512()
195 || !EVP_MD_meth_set_update(md, digest_sha512_update) in digest_sha512()
196 || !EVP_MD_meth_set_final(md, digest_sha512_final)) { in digest_sha512()
197 EVP_MD_meth_free(md); in digest_sha512()
198 md = NULL; in digest_sha512()
200 _hidden_sha512_md = md; in digest_sha512()
224 const EVP_MD *md; in ossltest_digest_nids() local
225 if ((md = digest_md5()) != NULL) in ossltest_digest_nids()
226 digest_nids[pos++] = EVP_MD_get_type(md); in ossltest_digest_nids()
227 if ((md = digest_sha1()) != NULL) in ossltest_digest_nids()
228 digest_nids[pos++] = EVP_MD_get_type(md); in ossltest_digest_nids()
229 if ((md = digest_sha256()) != NULL) in ossltest_digest_nids()
230 digest_nids[pos++] = EVP_MD_get_type(md); in ossltest_digest_nids()
231 if ((md = digest_sha384()) != NULL) in ossltest_digest_nids()
232 digest_nids[pos++] = EVP_MD_get_type(md); in ossltest_digest_nids()
233 if ((md = digest_sha512()) != NULL) in ossltest_digest_nids()
234 digest_nids[pos++] = EVP_MD_get_type(md); in ossltest_digest_nids()
554 static void fill_known_data(unsigned char *md, unsigned int len) in fill_known_data() argument
559 md[i] = (unsigned char)(i & 0xff); in fill_known_data()
580 static int digest_md5_final(EVP_MD_CTX *ctx, unsigned char *md) in digest_md5_final() argument
582 int ret = EVP_MD_meth_get_final(EVP_md5())(ctx, md); in digest_md5_final()
585 fill_known_data(md, MD5_DIGEST_LENGTH); in digest_md5_final()
604 static int digest_sha1_final(EVP_MD_CTX *ctx, unsigned char *md) in digest_sha1_final() argument
606 int ret = EVP_MD_meth_get_final(EVP_sha1())(ctx, md); in digest_sha1_final()
609 fill_known_data(md, SHA_DIGEST_LENGTH); in digest_sha1_final()
628 static int digest_sha256_final(EVP_MD_CTX *ctx, unsigned char *md) in digest_sha256_final() argument
630 int ret = EVP_MD_meth_get_final(EVP_sha256())(ctx, md); in digest_sha256_final()
633 fill_known_data(md, SHA256_DIGEST_LENGTH); in digest_sha256_final()
652 static int digest_sha384_final(EVP_MD_CTX *ctx, unsigned char *md) in digest_sha384_final() argument
654 int ret = EVP_MD_meth_get_final(EVP_sha384())(ctx, md); in digest_sha384_final()
657 fill_known_data(md, SHA384_DIGEST_LENGTH); in digest_sha384_final()
676 static int digest_sha512_final(EVP_MD_CTX *ctx, unsigned char *md) in digest_sha512_final() argument
678 int ret = EVP_MD_meth_get_final(EVP_sha512())(ctx, md); in digest_sha512_final()
681 fill_known_data(md, SHA512_DIGEST_LENGTH); in digest_sha512_final()