27 #ifndef POLARSSL_SHA4_H
28 #define POLARSSL_SHA4_H
34 #if defined(_MSC_VER) || defined(__WATCOMC__)
35 #define UL64(x) x##ui64
36 typedef unsigned __int64 uint64_t;
39 #define UL64(x) x##ULL
42 #define POLARSSL_ERR_SHA4_FILE_IO_ERROR -0x007A
44 #if !defined(POLARSSL_SHA1_ALT)
55 unsigned char buffer[128];
57 unsigned char ipad[128];
58 unsigned char opad[128];
112 void sha4(
const unsigned char *input,
size_t ilen,
113 unsigned char output[64],
int is384 );
124 int sha4_file(
const char *path,
unsigned char output[64],
int is384 );
171 void sha4_hmac(
const unsigned char *key,
size_t keylen,
172 const unsigned char *input,
size_t ilen,
173 unsigned char output[64],
int is384 );
void sha4_hmac_reset(sha4_context *ctx)
SHA-512 HMAC context reset.
int sha4_file(const char *path, unsigned char output[64], int is384)
Output = SHA-512( file contents )
void sha4_hmac_starts(sha4_context *ctx, const unsigned char *key, size_t keylen, int is384)
SHA-512 HMAC context setup.
int sha4_self_test(int verbose)
Checkup routine.
Configuration options (set of defines)
void sha4_starts(sha4_context *ctx, int is384)
SHA-512 context setup.
void sha4_hmac(const unsigned char *key, size_t keylen, const unsigned char *input, size_t ilen, unsigned char output[64], int is384)
Output = HMAC-SHA-512( hmac key, input buffer )
void sha4_update(sha4_context *ctx, const unsigned char *input, size_t ilen)
SHA-512 process buffer.
void sha4_hmac_finish(sha4_context *ctx, unsigned char output[64])
SHA-512 HMAC final digest.
void sha4(const unsigned char *input, size_t ilen, unsigned char output[64], int is384)
Output = SHA-512( input buffer )
SHA-512 context structure.
void sha4_finish(sha4_context *ctx, unsigned char output[64])
SHA-512 final digest.
void sha4_hmac_update(sha4_context *ctx, const unsigned char *input, size_t ilen)
SHA-512 HMAC process buffer.