blob: cc486d5b16710007b14e44cb49333ca5113cee8d [file] [log] [blame]
#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;