2 * Special version of sha256.c that uses the libc SHA256 implementation
6 /* crypto/sha/sha256.c */
7 /* ====================================================================
8 * Copyright (c) 2004 The OpenSSL Project. All rights reserved
9 * according to the OpenSSL license [found in ../../LICENSE].
10 * ====================================================================
12 #include <openssl/opensslconf.h>
17 #include <openssl/crypto.h>
18 #include <openssl/sha.h>
19 #include <openssl/opensslv.h>
23 const char SHA256_version
[]="SHA-256" OPENSSL_VERSION_PTEXT
;
25 unsigned char *SHA224(const unsigned char *d
, size_t n
, unsigned char *md
)
28 static unsigned char m
[SHA224_DIGEST_LENGTH
];
32 SHA224_Update(&c
,d
,n
);
34 OPENSSL_cleanse(&c
,sizeof(c
));
38 unsigned char *SHA256(const unsigned char *d
, size_t n
, unsigned char *md
)
41 static unsigned char m
[SHA256_DIGEST_LENGTH
];
45 SHA256_Update(&c
,d
,n
);
47 OPENSSL_cleanse(&c
,sizeof(c
));