Botan 3.4.0
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
15namespace Botan {
16
18 CCAlgorithm algo;
19 CCMode mode;
20 CCPadding padding;
21 size_t block_size;
23};
24
25CommonCryptor_Opts commoncrypto_opts_from_algo_name(std::string_view algo_name);
26CommonCryptor_Opts commoncrypto_opts_from_algo(std::string_view algo);
27
28void commoncrypto_adjust_key_size(const uint8_t key[],
29 size_t length,
30 const CommonCryptor_Opts& opts,
31 secure_vector<uint8_t>& full_key);
32
33} // namespace Botan
34
35#endif
void commoncrypto_adjust_key_size(const uint8_t key[], size_t length, const CommonCryptor_Opts &opts, secure_vector< uint8_t > &full_key)
CommonCryptor_Opts commoncrypto_opts_from_algo(std::string_view algo)
CommonCryptor_Opts commoncrypto_opts_from_algo_name(std::string_view algo_name)
Key_Length_Specification key_spec