summaryrefslogtreecommitdiff
path: root/src/common/strlib.h
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-09 13:05:54 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-09 13:05:54 +0000
commit16675230f6fff2b30b48b83e395e273919b5515f (patch)
treeb55bc1f455b99e7dd9635cd06c9aae9c93be1ac2 /src/common/strlib.h
parentc5c74a00ce7bbc152f20066c22952770535dd7f5 (diff)
downloadhercules-16675230f6fff2b30b48b83e395e273919b5515f.tar.gz
hercules-16675230f6fff2b30b48b83e395e273919b5515f.tar.bz2
hercules-16675230f6fff2b30b48b83e395e273919b5515f.tar.xz
hercules-16675230f6fff2b30b48b83e395e273919b5515f.zip
Fixed login printing raw passwdenc passwords to console (bugreport:826).
Added strlib function bin2hex(). Cleaned up the md5calc interface a bit. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13055 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/strlib.h')
-rw-r--r--src/common/strlib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/strlib.h b/src/common/strlib.h
index 074c7eae3..1ba26ca4c 100644
--- a/src/common/strlib.h
+++ b/src/common/strlib.h
@@ -46,6 +46,10 @@ int safesnprintf(char* buf, size_t sz, const char* fmt, ...);
/// Lines start at 1.
int strline(const char* str, size_t pos);
+/// Produces the hexadecimal representation of the given input.
+/// The output buffer must be at least count*2+1 in size.
+/// Returns true on success, false on failure.
+bool bin2hex(char* output, unsigned char* input, size_t count);
/// Bitfield determining the behaviour of sv_parse and sv_split.