aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/string_coding.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/epee/include/string_coding.h')
-rw-r--r--contrib/epee/include/string_coding.h54
1 files changed, 1 insertions, 53 deletions
diff --git a/contrib/epee/include/string_coding.h b/contrib/epee/include/string_coding.h
index a2e3d6eb2..82050ef96 100644
--- a/contrib/epee/include/string_coding.h
+++ b/contrib/epee/include/string_coding.h
@@ -29,7 +29,7 @@
#define _STRING_CODING_H_
#include <string>
-//#include "md5_l.h"
+
namespace epee
{
namespace string_encoding
@@ -62,23 +62,6 @@ namespace string_encoding
(char*)str_trgt.data(), (int)str_trgt.size(), 0, 0);
return str_trgt;*/
}
-#ifdef WINDOWS_PLATFORM_EX
- inline std::string convert_to_ansii_win(const std::wstring& str_from)
- {
-
- int code_page = CP_ACP;
- std::string str_trgt;
- if(!str_from.size())
- return str_trgt;
- int cb = ::WideCharToMultiByte( code_page, 0, str_from.data(), (__int32)str_from.size(), 0, 0, 0, 0 );
- if(!cb)
- return str_trgt;
- str_trgt.resize(cb);
- ::WideCharToMultiByte( code_page, 0, str_from.data(), (int)str_from.size(),
- (char*)str_trgt.data(), (int)str_trgt.size(), 0, 0);
- return str_trgt;
- }
-#endif
inline std::string convert_to_ansii(const std::string& str_from)
{
@@ -254,41 +237,6 @@ namespace string_encoding
return ret;
}
- //md5
-#ifdef MD5_H
- inline
- std::string get_buf_as_hex_string(const void* pbuf, size_t len)
- {
- std::ostringstream result;
-
- const unsigned char* p_buff = (const unsigned char*)pbuf;
-
- for(unsigned int i=0;i<len;i++)
- { // convert md to hex-represented string (hex-letters in upper case!)
- result << std::setw(2) << std::setfill('0')
- << std::setbase(16) << std::nouppercase
- << (int)*p_buff++;
- }
-
- return result.str();
- }
-
- inline
- std::string get_md5_as_hexstring(const void* pbuff, size_t len)
- {
- unsigned char output[16] = {0};
- md5::md5((unsigned char*)pbuff, static_cast<unsigned int>(len), output);
- return get_buf_as_hex_string(output, sizeof(output));
- }
-
- inline
- std::string get_md5_as_hexstring(const std::string& src)
- {
- return get_md5_as_hexstring(src.data(), src.size());
- }
-#endif
-
-
}
}