Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
hex.h
Go to the documentation of this file.
1 /*
2  * Dibbler - a portable DHCPv6
3  *
4  * authors: Tomasz Mrugalski <thomson@klub.com.pl>
5  *
6  * Released under GNU GPL v2 licence
7  *
8  */
9 
10 #ifndef HEX_H
11 #define HEX_H
12 
13 #include <stdint.h>
14 #include <string>
15 #include <vector>
16 
17 std::vector<uint8_t> textToHex(std::string buf);
18 
19 std::string hexToText(const uint8_t* buf, size_t buf_len, bool add_colons = false,
20  bool add_0x = false);
21 
22 std::string hexToText(const std::vector<uint8_t>& vector, bool add_colons = false,
23  bool add_0x = false);
24 
25 #endif
26