aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/rc4.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-08-02 10:38:33 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-08-02 10:38:33 +0200
commita130ec9540b4a56b315c24285623b867c4c6f95c (patch)
tree509257f38c3af574e38189633bc99e89f84b2b29 /libavutil/rc4.c
parent9ed59f16e005554fe412bcc05b2ed40688f4fd16 (diff)
parentae365453c370c85f278bff7fbf9e20d9d335cb2a (diff)
downloadffmpeg-a130ec9540b4a56b315c24285623b867c4c6f95c.tar.gz
Merge commit 'ae365453c370c85f278bff7fbf9e20d9d335cb2a'
* commit 'ae365453c370c85f278bff7fbf9e20d9d335cb2a': rc4: add av_rc4_alloc() Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavutil/rc4.c')
-rw-r--r--libavutil/rc4.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libavutil/rc4.c b/libavutil/rc4.c
index 4e52ba5ac1..e507b4a1ab 100644
--- a/libavutil/rc4.c
+++ b/libavutil/rc4.c
@@ -22,9 +22,20 @@
*/
#include "avutil.h"
#include "common.h"
+#include "mem.h"
#include "rc4.h"
-typedef struct AVRC4 AVRC4;
+#if !FF_API_CRYPTO_CONTEXT
+struct AVRC4 {
+ uint8_t state[256];
+ int x, y;
+};
+#endif
+
+AVRC4 *av_rc4_alloc(void)
+{
+ return av_mallocz(sizeof(struct AVRC4));
+}
int av_rc4_init(AVRC4 *r, const uint8_t *key, int key_bits, int decrypt) {
int i, j;