Botan  2.12.1
Crypto and TLS for C++11
commoncrypto_utils.h
Go to the documentation of this file.
1 /*
2 * Utils for calling CommonCrypto
3 * (C) 2018 Jose Pereira
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 */
7 
8 #ifndef BOTAN_INTERNAL_COMMONCRYPTO_UTILS_H_
9 #define BOTAN_INTERNAL_COMMONCRYPTO_UTILS_H_
10 
11 #include <botan/key_spec.h>
12 
13 #include <CommonCrypto/CommonCrypto.h>
14 
15 namespace Botan {
16 
17 class Key_Length_Specification;
18 
20  {
21  CCAlgorithm algo;
22  CCMode mode;
23  CCPadding padding;
24  size_t block_size;
26  };
27 
28 CommonCryptor_Opts commoncrypto_opts_from_algo(const std::string& algo);
29 
30 void commoncrypto_adjust_key_size(const uint8_t key[], size_t length,
31  const CommonCryptor_Opts& opts, secure_vector<uint8_t>& full_key);
32 
33 
34 }
35 
36 #endif
CommonCryptor_Opts commoncrypto_opts_from_algo(const std::string &algo)
Key_Length_Specification key_spec
Definition: alg_id.cpp:13
void commoncrypto_adjust_key_size(const uint8_t key[], size_t length, const CommonCryptor_Opts &opts, secure_vector< uint8_t > &full_key)