FFmpeg
[フレーム]
Modules | Functions
Crypto and Hashing
libavutil

Modules

  AES
 
  AES-CTR
 
  Base64
 
 
 
  CAST5
 
  DES
 
 
  HMAC
 
  LZO
 
  RC4
 
  TEA
 
  TWOFISH
 
  XTEA
 

Functions

uint32_t  av_get_random_seed (void)
  Get a seed to use in conjunction with random functions. More...
 
int  av_random_bytes (uint8_t *buf, size_t len)
  Generate cryptographically secure random data, i.e. More...
 

Detailed Description

Function Documentation

av_get_random_seed()

uint32_t av_get_random_seed ( void  )

Get a seed to use in conjunction with random functions.

This function tries to provide a good seed at a best effort bases. Its possible to call this function multiple times if more bits are needed. It can be quite slow, which is why it should only be used as seed for a faster PRNG. The quality of the seed depends on the platform.

Definition at line 196 of file random_seed.c.

Referenced by av_aes_ctr_set_random_iv(), av_parse_color(), config_input(), config_output(), config_props(), do_adobe_auth(), do_llnw_auth(), ff_perlin_init(), init(), initialize(), main(), make_digest_auth(), mkv_init(), mxf_gen_umid(), ogg_init(), openssl_gen_certificate(), prompeg_init(), rtmp_server_handshake(), rtp_write_header(), rtsp_read_setup(), sap_write_header(), and test_apv_entropy_decode_block().

av_random_bytes()

int av_random_bytes ( uint8_t *  buf,
size_t  len 
)

Generate cryptographically secure random data, i.e.

suitable for use as encryption keys and similar.

Parameters
buf buffer into which the random data will be written
len size of buf in bytes
Return values
0 success, len bytes of random data was written into buf
a negative AVERROR code random data could not be generated

Definition at line 159 of file random_seed.c.

Referenced by av_get_random_seed(), do_encrypt(), and initialize().


Generated on Sat Oct 18 2025 19:24:21 for FFmpeg by   doxygen 1.8.17

AltStyle によって変換されたページ (->オリジナル) /