Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Key.h
Go to the documentation of this file.
1 /*
2  * Dibbler - a portable DHCPv6
3  *
4  * author: Tomasz Mrugalski <thomson@klub.com.pl>
5  *
6  * released under GNU GPL v2 licence
7  */
8 
9 #ifndef KEY_H
10 #define KEY_H
11 
12 #include <vector>
13 #include "SmartPtr.h"
14 #include "DHCPConst.h"
15 #include "Portable.h"
16 
17 typedef std::vector<uint8_t> TKey;
18 
19 class TSIGKey {
20 public:
21  TSIGKey(const std::string& name);
22  std::string getAlgorithmText();
23 
24  bool setData(const std::string& base64encoded);
25  std::string getPackedData();
26  std::string getBase64Data();
27 
29  std::string Name_;
31 protected:
32  std::string Data_;
33  std::string Base64Data_;
34 };
35 
36 typedef std::vector< SPtr<TSIGKey> > TSIGKeyList;
37 
38 #endif /* KEY_H */
39