From f4327898532fbd1c95d50f3a19b9d096668315fe Mon Sep 17 00:00:00 2001 From: DukePyrolator Date: Fri, 15 Jan 2010 18:07:41 +0000 Subject: some code cleanup in enc_sha256 git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2760 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/enc_sha256.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/core/enc_sha256.c b/src/core/enc_sha256.c index 1f1d1ca42..569f727e6 100644 --- a/src/core/enc_sha256.c +++ b/src/core/enc_sha256.c @@ -164,12 +164,9 @@ class ESHA256 : public Module std::string buf(password, password.find(":", pos+1)+1, password.size()); char buf2[1000]; b64_decode(buf.c_str(), buf2, 1000); - spacesepstream sep(buf2); - while (sep.GetToken(buf)) - { - salt[i] = static_cast(strtoul(buf.c_str(), NULL, 10)); - i++; - } + std::stringstream sbuf(buf2); + for (i = 0; i < 8; i++) + sbuf >> salt[i]; } void SHA256Init(SHA256Context *ctx) -- cgit