Kea  1.9.9-git
base32hex.h
Go to the documentation of this file.
1 // Copyright (C) 2009-2015 Internet Systems Consortium, Inc. ("ISC")
2 //
3 // This Source Code Form is subject to the terms of the Mozilla Public
4 // License, v. 2.0. If a copy of the MPL was not distributed with this
5 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 
7 #ifndef BASE32HEX_H
8 #define BASE32HEX_H 1
9 
10 #include <stdint.h>
11 #include <string>
12 #include <vector>
13 
14 //
15 // Note: this helper module isn't specific to the DNS protocol per se.
16 // We should probably move this to somewhere else, possibly in some common
17 // utility area.
18 //
19 
20 namespace isc {
21 namespace util {
22 namespace encode {
23 
34 std::string encodeBase32Hex(const std::vector<uint8_t>& binary);
35 
46 void decodeBase32Hex(const std::string& input, std::vector<uint8_t>& result);
47 
48 } // namespace encode
49 } // namespace util
50 } // namespace isc
51 
52 #endif // BASE32HEX_H
53 
54 // Local Variables:
55 // mode: c++
56 // End:
Defines the logger used by the top-level component of kea-dhcp-ddns.
std::string encodeBase32Hex(const std::vector< uint8_t > &binary)
Encode binary data in the base32hex format.
Definition: base_n.cc:459
void decodeBase32Hex(const std::string &input, std::vector< uint8_t > &result)
Decode a text encoded in the base32hex format into the original data.
Definition: base_n.cc:464