Botan  2.19.1
Crypto and TLS for C++11
xmss_key_pair.h
Go to the documentation of this file.
1 /*
2  * XMSS Key Pair
3  * (C) 2016 Matthias Gierlings
4  *
5  * Botan is released under the Simplified BSD License (see license.txt)
6  **/
7 
8 #ifndef BOTAN_XMSS_KEY_PAIR_H_
9 #define BOTAN_XMSS_KEY_PAIR_H_
10 
11 #include <botan/xmss.h>
12 
13 BOTAN_DEPRECATED_HEADER(xmss_key_pair.h)
14 
15 namespace Botan {
16 
17 /**
18  * A pair of XMSS public and private key.
19  **/
21  {
22  public:
25  : m_priv_key(xmss_oid, rng), m_pub_key(m_priv_key) {}
26 
27  XMSS_Key_Pair(const XMSS_PublicKey& pub_key,
28  const XMSS_PrivateKey& priv_key)
29  : m_priv_key(priv_key), m_pub_key(pub_key)
30  {}
31 
33  XMSS_PrivateKey&& priv_key)
34  : m_priv_key(std::move(priv_key)), m_pub_key(std::move(pub_key)) {}
35 
36  const XMSS_PublicKey& public_key() const { return m_pub_key; }
37  XMSS_PublicKey& public_key() { return m_pub_key; }
38 
39  const XMSS_PrivateKey& private_key() const { return m_priv_key; }
40  XMSS_PrivateKey& private_key() { return m_priv_key; }
41 
42  private:
43  XMSS_PrivateKey m_priv_key;
44  XMSS_PublicKey m_pub_key;
45  };
46 
47 }
48 
49 #endif
XMSS_Key_Pair(XMSS_PublicKey &&pub_key, XMSS_PrivateKey &&priv_key)
Definition: xmss_key_pair.h:32
const XMSS_PrivateKey & private_key() const
Definition: xmss_key_pair.h:39
#define BOTAN_PUBLIC_API(maj, min)
Definition: compiler.h:31
Definition: bigint.h:1143
const XMSS_PublicKey & public_key() const
Definition: xmss_key_pair.h:36
XMSS_PublicKey & public_key()
Definition: xmss_key_pair.h:37
XMSS_Key_Pair(XMSS_Parameters::xmss_algorithm_t xmss_oid, RandomNumberGenerator &rng)
Definition: xmss_key_pair.h:23
Definition: alg_id.cpp:13
#define BOTAN_DEPRECATED_HEADER(hdr)
Definition: compiler.h:132
XMSS_Key_Pair(const XMSS_PublicKey &pub_key, const XMSS_PrivateKey &priv_key)
Definition: xmss_key_pair.h:27
XMSS_PrivateKey & private_key()
Definition: xmss_key_pair.h:40