Collaboration diagram for SHA:

Functions

struct AVSHAav_sha_alloc (void)
 Allocate an AVSHA context. More...
 
int av_sha_init (struct AVSHA *context, int bits)
 Initialize SHA-1 or SHA-2 hashing. More...
 
void av_sha_update (struct AVSHA *context, const uint8_t *data, unsigned int len)
 Update hash value. More...
 
void av_sha_final (struct AVSHA *context, uint8_t *digest)
 Finish hashing and output digest value. More...
 

Variables

const int av_sha_size
 

Detailed Description

Function Documentation

struct AVSHA* av_sha_alloc ( void  )

Allocate an AVSHA context.

Definition at line 43 of file sha.c.

Referenced by av_hmac_alloc(), ff_rtmp_calc_digest(), and mkv_write_attachments().

void av_sha_final ( struct AVSHA context,
uint8_t digest 
)

Finish hashing and output digest value.

Parameters
contexthash function context
digestbuffer where output digest value is stored

Definition at line 320 of file sha.c.

Referenced by av_hmac_alloc(), av_sha_final(), ff_rtmp_calc_digest(), get_generic_seed(), and mkv_write_attachments().

int av_sha_init ( struct AVSHA context,
int  bits 
)

Initialize SHA-1 or SHA-2 hashing.

Parameters
contextpointer to the function context (of size av_sha_size)
bitsnumber of bits in digest (SHA-1 - 160 bits, SHA-2 224 or 256 bits)
Returns
zero if initialization succeeded, -1 otherwise

Definition at line 252 of file sha.c.

Referenced by av_sha_final(), ff_rtmp_calc_digest(), get_generic_seed(), mkv_write_attachments(), and sha1_init().

void av_sha_update ( struct AVSHA 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 293 of file sha.c.

Referenced by av_hmac_alloc(), av_sha_final(), ff_rtmp_calc_digest(), get_generic_seed(), and mkv_write_attachments().

Variable Documentation

const int av_sha_size

Definition at line 41 of file sha.c.

Referenced by get_generic_seed().