summaryrefslogtreecommitdiff
path: root/libavutil/blowfish.h
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2015-07-28 16:57:46 -0300
committerAnton Khirnov <anton@khirnov.net>2015-07-31 09:04:09 +0200
commit7a7df34c91e16ea8936f59524145a2cdd6b790f9 (patch)
treeb19bbe820373398e3bae2a0da87167c628d54dac /libavutil/blowfish.h
parentcd4d9df22738e6f147521ccb72c7930db6050914 (diff)
blowfish: add av_blowfish_alloc()
Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavutil/blowfish.h')
-rw-r--r--libavutil/blowfish.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavutil/blowfish.h b/libavutil/blowfish.h
index 8c29536cfe..4f86bf7cfb 100644
--- a/libavutil/blowfish.h
+++ b/libavutil/blowfish.h
@@ -22,6 +22,7 @@
#define AVUTIL_BLOWFISH_H
#include <stdint.h>
+#include "version.h"
/**
* @defgroup lavu_blowfish Blowfish
@@ -29,12 +30,21 @@
* @{
*/
+#if FF_API_CRYPTO_CONTEXT
#define AV_BF_ROUNDS 16
typedef struct AVBlowfish {
uint32_t p[AV_BF_ROUNDS + 2];
uint32_t s[4][256];
} AVBlowfish;
+#else
+typedef struct AVBlowfish AVBlowfish;
+#endif
+
+/**
+ * Allocate an AVBlowfish context.
+ */
+AVBlowfish *av_blowfish_alloc(void);
/**
* Initialize an AVBlowfish context.