From bbff5ae4d3961d5c2bff61e7d989c4a69c17ffc7 Mon Sep 17 00:00:00 2001 From: Naram Qashat Date: Sun, 8 Aug 2010 21:53:32 -0400 Subject: Add a db-upgrade to convert base64-encoded encrypted passwords to hexadecimal strings of the raw data, add in Anope::Hex for C-style strings and added Anope::Unhex, modified the encryption modules to use Hex and Unhex. --- include/anope.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/anope.h b/include/anope.h index be5c2f964..84f68ac45 100644 --- a/include/anope.h +++ b/include/anope.h @@ -322,6 +322,14 @@ namespace Anope * @return a anope::string containing the hex value */ extern CoreExport string Hex(const string &data); + extern CoreExport string Hex(const char *data, unsigned len); + + /** Converts a string from hex + * @param src The data to be converted + * @param dest The destination string + */ + extern CoreExport void Unhex(const Anope::string &src, Anope::string &dest); + extern CoreExport void Unhex(const Anope::string &src, char *dest); } /** sepstream allows for splitting token seperated lists. -- cgit