SHA256
SHA256 utilities. More...
Modules |
|
Types | |
SHA256 data types.
|
|
Functions |
|
void | gos_sha256_starts ( gos_sha256_context_t *ctx, int32_t is224) |
SHA-256 context setup.
More...
|
|
void | gos_sha256_update ( gos_sha256_context_t *ctx, const unsigned char *input, uint32_t ilen) |
SHA-256 process buffer.
More...
|
|
void | gos_sha256_finish ( gos_sha256_context_t *ctx, unsigned char output[32]) |
SHA-256 final digest.
More...
|
|
void | gos_sha256 (const unsigned char *input, uint32_t ilen, unsigned char output[32], int32_t is224) |
Output = SHA-256( input buffer )
More...
|
|
void | gos_sha256_hmac_starts ( gos_sha256_hmac_context_t *ctx, const unsigned char *key, uint32_t keylen, int32_t is224) |
SHA-256 HMAC context setup.
More...
|
|
void | gos_sha256_hmac_update ( gos_sha256_hmac_context_t *ctx, const unsigned char *input, uint32_t ilen) |
SHA-256 HMAC process buffer.
More...
|
|
void | gos_sha256_hmac_finish ( gos_sha256_hmac_context_t *ctx, unsigned char output[32]) |
SHA-256 HMAC final digest.
More...
|
|
void | gos_sha256_hmac (const unsigned char *key, uint32_t keylen, const unsigned char *input, uint32_t ilen, unsigned char output[32], int32_t is224) |
Output = HMAC-SHA-256( hmac key, input buffer )
More...
|
|
Detailed Description
SHA256 utilities.
Function Documentation
◆ gos_sha256()
void gos_sha256 | ( | 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
◆ gos_sha256_finish()
void gos_sha256_finish | ( | gos_sha256_context_t * |
ctx,
|
unsigned char |
output[32]
|
||
) |
SHA-256 final digest.
- Parameters
-
ctx
SHA-256 context output
SHA-224/256 checksum result
◆ gos_sha256_hmac()
void gos_sha256_hmac | ( | const unsigned char * |
key,
|
uint32_t |
keylen,
|
||
const unsigned char * |
input,
|
||
uint32_t |
ilen,
|
||
unsigned char |
output[32],
|
||
int32_t |
is224
|
||
) |
Output = HMAC-SHA-256( hmac key, input buffer )
- Parameters
-
key
HMAC secret key keylen
Length of key input
buffer holding the data ilen
Length of input buffer output
HMAC-SHA-224/256 result is224
0 = use SHA256, 1 = use SHA224
◆ gos_sha256_hmac_finish()
void gos_sha256_hmac_finish | ( | gos_sha256_hmac_context_t * |
ctx,
|
unsigned char |
output[32]
|
||
) |
SHA-256 HMAC final digest.
- Parameters
-
ctx
HMAC context output
SHA-224/256 HMAC checksum result
◆ gos_sha256_hmac_starts()
void gos_sha256_hmac_starts | ( | gos_sha256_hmac_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
◆ gos_sha256_hmac_update()
void gos_sha256_hmac_update | ( | gos_sha256_hmac_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
◆ gos_sha256_starts()
void gos_sha256_starts | ( | gos_sha256_context_t * |
ctx,
|
int32_t |
is224
|
||
) |
SHA-256 context setup.
- Parameters
-
ctx
context to be initialized is224
0 = use SHA256, 1 = use SHA224
◆ gos_sha256_update()
void gos_sha256_update | ( | gos_sha256_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