Go to the documentation of this file.
69 #if defined(OPENSSL_NO_SHA) || (defined(OPENSSL_NO_SHA0) && defined(OPENSSL_NO_SHA1))
70 #error SHA is disabled.
73 #if defined(OPENSSL_FIPS)
74 #define FIPS_SHA_SIZE_T size_t
85 #define SHA_LONG unsigned long
86 #elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__)
87 #define SHA_LONG unsigned long
88 #define SHA_LONG_LOG2 3
90 #define SHA_LONG unsigned int
94 #define SHA_CBLOCK (SHA_LBLOCK*4)
97 #define SHA_LAST_BLOCK (SHA_CBLOCK-8)
98 #define SHA_DIGEST_LENGTH 20
108 #ifndef OPENSSL_NO_SHA0
110 int private_SHA_Init(
SHA_CTX *c);
115 unsigned char *
SHA(
const unsigned char *d,
size_t n,
unsigned char *md);
118 #ifndef OPENSSL_NO_SHA1
120 int private_SHA1_Init(
SHA_CTX *c);
125 unsigned char *
SHA1(
const unsigned char *d,
size_t n,
unsigned char *md);
129 #define SHA256_CBLOCK (SHA_LBLOCK*4)
132 #define SHA224_DIGEST_LENGTH 28
133 #define SHA256_DIGEST_LENGTH 32
143 #ifndef OPENSSL_NO_SHA256
151 unsigned char *
SHA224(
const unsigned char *d,
size_t n,
unsigned char *md);
155 unsigned char *
SHA256(
const unsigned char *d,
size_t n,
unsigned char *md);
159 #define SHA384_DIGEST_LENGTH 48
160 #define SHA512_DIGEST_LENGTH 64
162 #ifndef OPENSSL_NO_SHA512
168 #define SHA512_CBLOCK (SHA_LBLOCK*8)
171 #if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
172 #define SHA_LONG64 unsigned __int64
173 #define U64(C) C##UI64
174 #elif defined(__arch64__)
175 #define SHA_LONG64 unsigned long
178 #define SHA_LONG64 unsigned long long
179 #define U64(C) C##ULL
194 #ifndef OPENSSL_NO_SHA512
202 unsigned char *
SHA384(
const unsigned char *d,
size_t n,
unsigned char *md);
206 unsigned char *
SHA512(
const unsigned char *d,
size_t n,
unsigned char *md);