27 #ifndef POLARSSL_SHA1_H
28 #define POLARSSL_SHA1_H
36 typedef UINT32 uint32_t;
41 #define POLARSSL_ERR_SHA1_FILE_IO_ERROR -0x0076
43 #if !defined(POLARSSL_SHA1_ALT)
54 unsigned char buffer[64];
56 unsigned char ipad[64];
57 unsigned char opad[64];
111 void sha1(
const unsigned char *input,
size_t ilen,
unsigned char output[20] );
121 int sha1_file(
const char *path,
unsigned char output[20] );
165 void sha1_hmac(
const unsigned char *key,
size_t keylen,
166 const unsigned char *input,
size_t ilen,
167 unsigned char output[20] );
void sha1_hmac_finish(sha1_context *ctx, unsigned char output[20])
SHA-1 HMAC final digest.
int sha1_self_test(int verbose)
Checkup routine.
void sha1(const unsigned char *input, size_t ilen, unsigned char output[20])
Output = SHA-1( input buffer )
void sha1_finish(sha1_context *ctx, unsigned char output[20])
SHA-1 final digest.
void sha1_hmac(const unsigned char *key, size_t keylen, const unsigned char *input, size_t ilen, unsigned char output[20])
Output = HMAC-SHA-1( hmac key, input buffer )
Configuration options (set of defines)
void sha1_hmac_reset(sha1_context *ctx)
SHA-1 HMAC context reset.
int sha1_file(const char *path, unsigned char output[20])
Output = SHA-1( file contents )
void sha1_hmac_starts(sha1_context *ctx, const unsigned char *key, size_t keylen)
SHA-1 HMAC context setup.
void sha1_starts(sha1_context *ctx)
SHA-1 context setup.
void sha1_update(sha1_context *ctx, const unsigned char *input, size_t ilen)
SHA-1 process buffer.
void sha1_process(sha1_context *ctx, const unsigned char data[64])
void sha1_hmac_update(sha1_context *ctx, const unsigned char *input, size_t ilen)
SHA-1 HMAC process buffer.