Botan 2.19.5 Crypto and TLS for C&

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/sym_algo.h>
12
13#include <CommonCrypto/CommonCrypto.h>
14
15 namespace Botan {
16
17 struct CommonCryptor_Opts
18 {
19 CCAlgorithm algo;
20 CCMode mode;
21 CCPadding padding;
22 size_t block_size;
23 Key_Length_Specification key_spec{0};
24 };
25
26CommonCryptor_Opts commoncrypto_opts_from_algo_name(const std::string& algo_name);
27CommonCryptor_Opts commoncrypto_opts_from_algo(const std::string& algo);
28
29 void commoncrypto_adjust_key_size(const uint8_t key[], size_t length,
30 const CommonCryptor_Opts& opts, secure_vector<uint8_t>& full_key);
31
32
33}
34
35#endif
Botan::Key_Length_Specification
Definition: sym_algo.h:20
Botan
Definition: alg_id.cpp:13
Botan::commoncrypto_opts_from_algo
CommonCryptor_Opts commoncrypto_opts_from_algo(const std::string &algo)
Definition: commoncrypto_utils.cpp:111
Botan::commoncrypto_opts_from_algo_name
CommonCryptor_Opts commoncrypto_opts_from_algo_name(const std::string &algo_name)
Definition: commoncrypto_utils.cpp:51
Botan::commoncrypto_adjust_key_size
void commoncrypto_adjust_key_size(const uint8_t key[], size_t length, const CommonCryptor_Opts &opts, secure_vector< uint8_t > &full_key)
Definition: commoncrypto_utils.cpp:162
Botan::CommonCryptor_Opts
Definition: commoncrypto_utils.h:18
Botan::CommonCryptor_Opts::algo
CCAlgorithm algo
Definition: commoncrypto_utils.h:19
Botan::CommonCryptor_Opts::key_spec
Key_Length_Specification key_spec
Definition: commoncrypto_utils.h:23
Botan::CommonCryptor_Opts::mode
CCMode mode
Definition: commoncrypto_utils.h:20
Botan::CommonCryptor_Opts::block_size
size_t block_size
Definition: commoncrypto_utils.h:22
Botan::CommonCryptor_Opts::padding
CCPadding padding
Definition: commoncrypto_utils.h:21