Loading...
Searching...
No Matches
RC4
libavutil » Crypto and Hashing

## Data Structures

struct | AVRC4

## Functions

AVRC4 * | av_rc4_alloc (void)
| Allocate an AVRC4 context.
int | av_rc4_init (struct AVRC4 *d, const uint8_t *key, int key_bits, int decrypt)
| Initializes an AVRC4 context.
void | av_rc4_crypt (struct AVRC4 *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt)
| Encrypts / decrypts using the RC4 algorithm.

## Detailed Description

## Function Documentation

## av_rc4_alloc()

AVRC4 * av_rc4_alloc | ( | void |  | ) |

Allocate an AVRC4 context.

## av_rc4_init()

int av_rc4_init | ( | struct AVRC4 * | d,
|  | const uint8_t * | key,
|  | int | key_bits,
|  | int | decrypt )

Initializes an AVRC4 context.

Parameters

  d | pointer to the AVRC4 context
  key | buffer containing the key
  key_bits | must be a multiple of 8
  decrypt | 0 for encryption, 1 for decryption, currently has no effect

Returns
  zero on success, negative value otherwise

## av_rc4_crypt()

void av_rc4_crypt | ( | struct AVRC4 * | d,
|  | uint8_t * | dst,
|  | const uint8_t * | src,
|  | int | count,
|  | uint8_t * | iv,
|  | int | decrypt )

Encrypts / decrypts using the RC4 algorithm.

Parameters

  d | pointer to the AVRC4 context
  count | number of bytes
  dst | destination array, can be equal to src
  src | source array, can be equal to dst, may be NULL
  iv | not (yet) used for RC4, should be NULL
  decrypt | 0 for encryption, 1 for decryption, not (yet) used