47 #define NUM_BYTES_SHA2 32 54 unsigned long total[2];
55 unsigned long state[8];
56 unsigned char buffer[64];
57 unsigned char ipad[64];
58 unsigned char opad[64];
96 void sha2(
unsigned char *input,
int ilen,
97 unsigned char *output,
int is224 );
122 unsigned char *key,
int keylen );
132 unsigned char *input,
int ilen );
152 void sha2_hmac(
unsigned char *key,
int keylen,
153 unsigned char *input,
int ilen,
154 unsigned char *output,
int is224 );
void sha2(unsigned char *input, int ilen, unsigned char *output, int is224)
Output = SHA-256( input buffer )
Definition: sha2.cpp:323
SHA-256 context structure.
Definition: sha2.h:52
void sha2_update(sha2_context *ctx, unsigned char *input, int ilen)
SHA-256 process buffer.
Definition: sha2.cpp:237
void sha2_finish(sha2_context *ctx, unsigned char *output)
SHA-256 final digest.
Definition: sha2.cpp:289
void sha2_hmac_update(sha2_context *ctx, unsigned char *input, int ilen)
SHA-256 HMAC process buffer.
Definition: sha2.cpp:396
void sha2_hmac_starts(sha2_context *ctx, int is224, unsigned char *key, int keylen)
Output = SHA-256( file contents )
Definition: sha2.cpp:373
int sha2_self_test(int verbose)
Checkup routine.
Definition: sha2.cpp:538
void sha2_hmac(unsigned char *key, int keylen, unsigned char *input, int ilen, unsigned char *output, int is224)
Output = HMAC-SHA-256( hmac key, input buffer )
Definition: sha2.cpp:425
int is224
Definition: sha2.h:59
void sha2_hmac_finish(sha2_context *ctx, unsigned char *output)
SHA-256 HMAC final digest.
Definition: sha2.cpp:405
void sha2_starts(sha2_context *ctx, int is224)
SHA-256 context setup.
Definition: sha2.cpp:70