void ff_http_auth_handle_header(HTTPAuthState *state, const char *key,
const char *value)
{
- if (!state)
- return;
-
if (!strcmp(key, "WWW-Authenticate")) {
const char *p;
if (av_stristart(value, "Basic ", &p) &&
DigestParams *digest = &state->digest_params;
int len;
uint32_t cnonce_buf[2];
- char cnonce[9];
+ char cnonce[17];
char nc[9];
int i;
char A1hash[33], A2hash[33], response[33];
/* Generate a client nonce. */
for (i = 0; i < 2; i++)
- cnonce_buf[i] = ff_random_get_seed();
+ cnonce_buf[i] = av_get_random_seed();
ff_data_to_hex(cnonce, (const uint8_t*) cnonce_buf, sizeof(cnonce_buf), 1);
cnonce[2*sizeof(cnonce_buf)] = 0;