|
|
|
@ -22,11 +22,27 @@ |
|
|
|
|
#define AVUTIL_RC4_H |
|
|
|
|
|
|
|
|
|
#include <stdint.h> |
|
|
|
|
#include "version.h" |
|
|
|
|
|
|
|
|
|
struct AVRC4 { |
|
|
|
|
/**
|
|
|
|
|
* @defgroup lavu_rc4 RC4 |
|
|
|
|
* @ingroup lavu_crypto |
|
|
|
|
* @{ |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
#if FF_API_CRYPTO_CONTEXT |
|
|
|
|
typedef struct AVRC4 { |
|
|
|
|
uint8_t state[256]; |
|
|
|
|
int x, y; |
|
|
|
|
}; |
|
|
|
|
} AVRC4; |
|
|
|
|
#else |
|
|
|
|
typedef struct AVRC4 AVRC4; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Allocate an AVRC4 context. |
|
|
|
|
*/ |
|
|
|
|
AVRC4 *av_rc4_alloc(void); |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Initializes an AVRC4 context. |
|
|
|
@ -47,4 +63,8 @@ int av_rc4_init(struct AVRC4 *d, const uint8_t *key, int key_bits, int decrypt); |
|
|
|
|
*/ |
|
|
|
|
void av_rc4_crypt(struct AVRC4 *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt); |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @} |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
#endif /* AVUTIL_RC4_H */ |
|
|
|
|