FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
SHA512
Crypto and Hashing

Functions

struct AVSHA512av_sha512_alloc (void)
 Allocate an AVSHA512 context.
 
int av_sha512_init (struct AVSHA512 *context, int bits)
 Initialize SHA-2 512 hashing.
 
void av_sha512_update (struct AVSHA512 *context, const uint8_t *data, unsigned int len)
 Update hash value.
 
void av_sha512_final (struct AVSHA512 *context, uint8_t *digest)
 Finish hashing and output digest value.
 

Variables

const int av_sha512_size
 

Detailed Description

Function Documentation

struct AVSHA512* av_sha512_alloc ( void  )
read

Allocate an AVSHA512 context.

Definition at line 43 of file sha512.c.

Referenced by av_hash_alloc(), and av_hmac_alloc().

int av_sha512_init ( struct AVSHA512 context,
int  bits 
)

Initialize SHA-2 512 hashing.

Parameters
contextpointer to the function context (of size av_sha512_size)
bitsnumber of bits in digest (224, 256, 384 or 512 bits)
Returns
zero if initialization succeeded, -1 otherwise

Definition at line 186 of file sha512.c.

Referenced by av_hash_init().

void av_sha512_update ( struct AVSHA512 context,
const uint8_t data,
unsigned int  len 
)

Update hash value.

Parameters
contexthash function context
datainput data to update hash with
leninput data length

Definition at line 237 of file sha512.c.

Referenced by av_hash_update(), av_hmac_alloc(), and av_sha512_final().

void av_sha512_final ( struct AVSHA512 context,
uint8_t digest 
)

Finish hashing and output digest value.

Parameters
contexthash function context
digestbuffer where output digest value is stored

Definition at line 264 of file sha512.c.

Referenced by av_hash_final(), and av_hmac_alloc().

Variable Documentation

const int av_sha512_size

Definition at line 41 of file sha512.c.