Add SHA-256.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17074 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -151,6 +151,22 @@ EVP_Digest(const void *data, size_t dsize, void *hash, unsigned int *hsize,
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static const struct hc_evp_md sha256 = {
|
||||||
|
32,
|
||||||
|
64,
|
||||||
|
sizeof(SHA256_CTX),
|
||||||
|
(void *)SHA256_Init,
|
||||||
|
(void *)SHA256_Update,
|
||||||
|
(void *)SHA256_Final,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
const EVP_MD *
|
||||||
|
EVP_sha256(void)
|
||||||
|
{
|
||||||
|
return &sha256;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct hc_evp_md sha1 = {
|
static const struct hc_evp_md sha1 = {
|
||||||
20,
|
20,
|
||||||
64,
|
64,
|
||||||
|
Reference in New Issue
Block a user