Crypto and Hashing
[Common utility functions]

Modules

 AES
 Base64
 LZO
 MD5
 SHA

Functions

unsigned long av_adler32_update (unsigned long adler, const uint8_t *buf, unsigned int len) av_pure
 Calculate the Adler32 checksum of a buffer.
uint32_t av_get_random_seed (void)
 Get random data.

Function Documentation

unsigned long av_adler32_update ( unsigned long  adler,
const uint8_t *  buf,
unsigned int  len 
)

Calculate the Adler32 checksum of a buffer.

Passing the return value to a subsequent av_adler32_update() call allows the checksum of multiple buffers to be calculated as though they were concatenated.

Parameters:
adler initial checksum value
buf pointer to input buffer
len size of input buffer
Returns:
updated checksum

Definition at line 33 of file adler32.c.

Referenced by crc_write_packet(), end_frame(), and framecrc_write_packet().

uint32_t av_get_random_seed ( void   ) 

Get random data.

This function can be called repeatedly to generate more random bits as needed. It is generally quite slow, and usually used to seed a PRNG. As it uses /dev/urandom and /dev/random, the quality of the returned random data depends on the platform.

Definition at line 73 of file random_seed.c.

Referenced by av_parse_color(), config_input(), ff_rtsp_connect(), main(), make_digest_auth(), mkv_write_attachments(), mkv_write_header(), mxf_gen_umid(), ogg_write_header(), rtp_write_header(), and sap_write_header().