From d9e8b47e3144262d6bc4681740411d4bdafad6ac Mon Sep 17 00:00:00 2001
From: James Almer <jamrial@gmail.com>
Date: Tue, 28 Jul 2015 16:57:49 -0300
Subject: des: add av_des_alloc()

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
---
 libavutil/des.h | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

(limited to 'libavutil/des.h')

diff --git a/libavutil/des.h b/libavutil/des.h
index cda98122d3..7b82340219 100644
--- a/libavutil/des.h
+++ b/libavutil/des.h
@@ -24,10 +24,25 @@
 
 #include <stdint.h>
 
-struct AVDES {
+/**
+ * @defgroup lavu_des DES
+ * @ingroup lavu_crypto
+ * @{
+ */
+
+#if FF_API_CRYPTO_CONTEXT
+typedef struct AVDES {
     uint64_t round_keys[3][16];
     int triple_des;
-};
+} AVDES;
+#else
+typedef struct AVDES AVDES;
+#endif
+
+/**
+ * Allocate an AVDES context.
+ */
+AVDES *av_des_alloc(void);
 
 /**
  * @brief Initializes an AVDES context.
@@ -58,4 +73,8 @@ void av_des_crypt(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count,
  */
 void av_des_mac(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count);
 
+/**
+ * @}
+ */
+
 #endif /* AVUTIL_DES_H */
-- 
cgit v1.2.3