Botan  2.8.0
Crypto and TLS for C++11
bearssl.h
Go to the documentation of this file.
1 /*
2 * Utils for calling BearSSL
3 * (C) 2015,2016 Jack Lloyd
4 * (C) 2017 Patrick Wildt
5 *
6 * Botan is released under the Simplified BSD License (see license.txt)
7 */
8 
9 #ifndef BOTAN_INTERNAL_BEARSSL_H_
10 #define BOTAN_INTERNAL_BEARSSL_H_
11 
12 #include <botan/pk_ops_fwd.h>
13 #include <botan/secmem.h>
14 #include <botan/exceptn.h>
15 #include <memory>
16 #include <string>
17 
18 namespace Botan {
19 
20 class HashFunction;
21 
23  {
24  public:
25  BearSSL_Error(const std::string& what) :
26  Exception(what + " failed") {}
27  };
28 
29 /* Hash */
30 
31 std::unique_ptr<HashFunction>
32 make_bearssl_hash(const std::string& name);
33 
34 /* ECDSA */
35 
36 #if defined(BOTAN_HAS_ECDSA)
37 
38 class ECDSA_PublicKey;
39 class ECDSA_PrivateKey;
40 
41 std::unique_ptr<PK_Ops::Verification>
42 make_bearssl_ecdsa_ver_op(const ECDSA_PublicKey& key, const std::string& params);
43 std::unique_ptr<PK_Ops::Signature>
44 make_bearssl_ecdsa_sig_op(const ECDSA_PrivateKey& key, const std::string& params);
45 
46 #endif
47 
48 }
49 
50 #endif
int(* final)(unsigned char *, CTX *)
std::unique_ptr< HashFunction > make_bearssl_hash(const std::string &name)
BearSSL_Error(const std::string &what)
Definition: bearssl.h:25
std::string name
const char * what() const BOTAN_NOEXCEPT override
Definition: exceptn.h:25
Definition: alg_id.cpp:13