SHA-512 (Secure Hash Algorithm) hash function implementations.
More...
|
file | sha512.h |
| Public header for SHA-512 implementation.
|
|
SHA-512 (Secure Hash Algorithm) hash function implementations.
This module supports the following SHA-2 hash functions:
- SHA-512/224: 224 bits
- SHA-512/256: 256 bits
- SHA-384: 384 bits
- SHA-512: 512 bits
- See also
- For SHA-1, SHA-256, and variants thereof, see SHA.
◆ av_sha512_alloc()
struct AVSHA512 * av_sha512_alloc |
( |
void |
| ) |
|
Allocate an AVSHA512 context.
◆ av_sha512_init()
int av_sha512_init |
( |
struct AVSHA512 * |
context, |
|
|
int |
bits |
|
) |
| |
Initialize SHA-2 512 hashing.
- Parameters
-
context | pointer to the function context (of size av_sha512_size) |
bits | number of bits in digest (224, 256, 384 or 512 bits) |
- Returns
- zero if initialization succeeded, -1 otherwise
◆ av_sha512_update()
void av_sha512_update |
( |
struct AVSHA512 * |
context, |
|
|
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
Update hash value.
- Parameters
-
context | hash function context |
data | input data to update hash with |
len | input data length |
◆ av_sha512_final()
void av_sha512_final |
( |
struct AVSHA512 * |
context, |
|
|
uint8_t * |
digest |
|
) |
| |
Finish hashing and output digest value.
- Parameters
-
context | hash function context |
digest | buffer where output digest value is stored |
◆ av_sha512_size