aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/prov/commoncrypto/commoncrypto_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/prov/commoncrypto/commoncrypto_utils.h')
-rw-r--r--src/lib/prov/commoncrypto/commoncrypto_utils.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/lib/prov/commoncrypto/commoncrypto_utils.h b/src/lib/prov/commoncrypto/commoncrypto_utils.h
new file mode 100644
index 000000000..9847c292a
--- /dev/null
+++ b/src/lib/prov/commoncrypto/commoncrypto_utils.h
@@ -0,0 +1,32 @@
+/*
+* Utils for calling CommonCrypto
+* (C) 2018 Jose Pereira
+*
+* Botan is released under the Simplified BSD License (see license.txt)
+*/
+
+#ifndef BOTAN_INTERNAL_COMMONCRYPTO_UTILS_H_
+#define BOTAN_INTERNAL_COMMONCRYPTO_UTILS_H_
+
+#include <botan/key_spec.h>
+
+#include <CommonCrypto/CommonCrypto.h>
+
+namespace Botan {
+
+class Key_Length_Specification;
+
+struct CommonCryptor_Opts
+ {
+ CCAlgorithm algo;
+ CCMode mode;
+ CCPadding padding;
+ size_t block_size;
+ Key_Length_Specification key_spec{0};
+ };
+
+CommonCryptor_Opts commoncrypto_opts_from_algo(const std::string& algo);
+
+}
+
+#endif