From 5a8727e34b938b70623ca865273fd81c7604b461 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 13 Mar 2018 06:26:06 +0100 Subject: Expose include dir --- include/bin2hex.hpp | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 include/bin2hex.hpp (limited to 'include/bin2hex.hpp') diff --git a/include/bin2hex.hpp b/include/bin2hex.hpp deleted file mode 100644 index 72b57c1..0000000 --- a/include/bin2hex.hpp +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - -#include - -namespace odhtdb -{ - static const char HEX_TABLE[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; - - static std::string bin2hex(const char *data, size_t dataSize) - { - std::string result; - result.resize(dataSize * 2); - - for(int i = 0; i < dataSize; ++i) - { - char c = data[i]; - result[i * 2 + 0] = HEX_TABLE[(c & 0xF0) >> 4]; - result[i * 2 + 1] = HEX_TABLE[(c & 0x0F)]; - } - - return result; - } -} -- cgit v1.2.3