#define SHA_LBLOCK 16 | |
#define SHA_CBLOCK (SHA_LBLOCK*4)/* SHA treats input data as a | |
* contiguous array of 32 bit wide | |
* big-endian values. */ | |
#define SHA_LAST_BLOCK (SHA_CBLOCK-8) | |
#define SHA_DIGEST_LENGTH 20 | |
#define SHA512_CBLOCK (SHA_LBLOCK*8) | |
#define SHA512_DIGEST_LENGTH 64 | |
#define SHA_LONG64 unsigned long | |
#define U64(C) C##ULL | |
typedef struct SHA512state_st { | |
SHA_LONG64 h[8]; | |
SHA_LONG64 Nl, Nh; | |
union { | |
SHA_LONG64 d[SHA_LBLOCK]; | |
unsigned char p[SHA512_CBLOCK]; | |
} u; | |
unsigned int num, md_len; | |
} SHA512_CTX; | |