SHA2
SHA2 utilities. More...
Modules | |
Types | |
SHA2 data types. | |
Functions | |
void | sha2_starts (sha2_context_t *ctx, int32_t is224) |
SHA-256 context setup. More... | |
void | sha2_update (sha2_context_t *ctx, const unsigned char *input, uint32_t ilen) |
SHA-256 process buffer. More... | |
void | sha2_finish (sha2_context_t *ctx, unsigned char output[32]) |
SHA-256 final digest. More... | |
void | sha2 (const unsigned char *input, uint32_t ilen, unsigned char output[32], int32_t is224) |
Output = SHA-256( input buffer ) More... | |
void | sha2_hmac_starts (sha2_context_t *ctx, const unsigned char *key, uint32_t keylen, int32_t is224) |
SHA-256 HMAC context setup. More... | |
void | sha2_hmac_update (sha2_context_t *ctx, const unsigned char *input, uint32_t ilen) |
SHA-256 HMAC process buffer. More... | |
void | sha2_hmac_finish (sha2_context_t *ctx, unsigned char output[32]) |
SHA-256 HMAC final digest. More... | |
void | sha2_hmac (const zos_buffer_t *key, const zos_buffer_t *input, unsigned char output[32], int32_t is224) |
Output = HMAC-SHA-256( hmac key, input buffer ) More... | |
Detailed Description
SHA2 utilities.
Function Documentation
void sha2 | ( | const unsigned char * | input, |
uint32_t | ilen, |
||
unsigned char | output[32], |
||
int32_t | is224 |
||
) |
Output = SHA-256( input buffer )
- Parameters
-
input
buffer holding the data ilen
length of the input data output
SHA-224/256 checksum result is224
0 = use SHA256, 1 = use SHA224
void sha2_finish | ( | sha2_context_t * | ctx, |
unsigned char | output[32] |
||
) |
SHA-256 final digest.
- Parameters
-
ctx
SHA-256 context output
SHA-224/256 checksum result
void sha2_hmac | ( | const zos_buffer_t * | key, |
const zos_buffer_t * | input, |
||
unsigned char | output[32], |
||
int32_t | is224 |
||
) |
Output = HMAC-SHA-256( hmac key, input buffer )
- Parameters
-
key
HMAC secret key input
buffer holding the data output
HMAC-SHA-224/256 result is224
0 = use SHA256, 1 = use SHA224
void sha2_hmac_finish | ( | sha2_context_t * | ctx, |
unsigned char | output[32] |
||
) |
SHA-256 HMAC final digest.
- Parameters
-
ctx
HMAC context output
SHA-224/256 HMAC checksum result
void sha2_hmac_starts | ( | sha2_context_t * | ctx, |
const unsigned char * | key, |
||
uint32_t | keylen, |
||
int32_t | is224 |
||
) |
SHA-256 HMAC context setup.
- Parameters
-
ctx
HMAC context to be initialized key
HMAC secret key keylen
length of the HMAC key is224
0 = use SHA256, 1 = use SHA224
void sha2_hmac_update | ( | sha2_context_t * | ctx, |
const unsigned char * | input, |
||
uint32_t | ilen |
||
) |
SHA-256 HMAC process buffer.
- Parameters
-
ctx
HMAC context input
buffer holding the data ilen
length of the input data
void sha2_starts | ( | sha2_context_t * | ctx, |
int32_t | is224 |
||
) |
SHA-256 context setup.
- Parameters
-
ctx
context to be initialized is224
0 = use SHA256, 1 = use SHA224
void sha2_update | ( | sha2_context_t * | ctx, |
const unsigned char * | input, |
||
uint32_t | ilen |
||
) |
SHA-256 process buffer.
- Parameters
-
ctx
SHA-256 context input
buffer holding the data ilen
length of the input data