Go to the documentation of this file.
57 err =
read(fd, dst,
sizeof(*dst));
73 static uint64_t
i = 0;
74 static uint32_t
buffer[512] = { 0 };
75 unsigned char digest[20];
92 if (last_t + 2*last_td + (CLOCKS_PER_SEC > 1000) >= t) {
94 buffer[
i & 511] = 1664525*
buffer[
i & 511] + 1013904223 + (last_td % 3294638521
U);
97 buffer[++
i & 511] += last_td % 3294638521
U;
98 if ((t - init_t) >= CLOCKS_PER_SEC>>5)
99 if (last_i &&
i - last_i > 4 ||
i - last_i > 64 ||
TEST &&
i - last_i > 8)
126 BCRYPT_ALG_HANDLE algo_handle;
127 NTSTATUS
ret = BCryptOpenAlgorithmProvider(&algo_handle, BCRYPT_RNG_ALGORITHM,
128 MS_PRIMITIVE_PROVIDER, 0);
129 if (BCRYPT_SUCCESS(
ret)) {
130 NTSTATUS
ret = BCryptGenRandom(algo_handle, (UCHAR*)&
seed,
sizeof(
seed), 0);
131 BCryptCloseAlgorithmProvider(algo_handle, 0);
132 if (BCRYPT_SUCCESS(
ret))
av_cold int av_sha_init(AVSHA *ctx, int bits)
Initialize SHA-1 or SHA-2 hashing.
uint32_t av_get_random_seed(void)
Get a seed to use in conjunction with random functions.
int avpriv_open(const char *filename, int flags,...)
A wrapper for open() setting O_CLOEXEC.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
void av_sha_final(AVSHA *ctx, uint8_t *digest)
Finish hashing and output digest value.
void av_sha_update(struct AVSHA *ctx, const uint8_t *data, size_t len)
Update hash value.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
static int read_random(uint32_t *dst, const char *file)
#define i(width, name, range_min, range_max)
the frame and frame reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFrame structures Several references can point to the same frame buffer
static uint32_t get_generic_seed(void)
static uint32_t BS_FUNC() read(BSCTX *bc, unsigned int n)
Return n bits from the buffer, n has to be in the 0-32 range.