diff options
author | DukePyrolator <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-01-15 18:07:41 +0000 |
---|---|---|
committer | DukePyrolator <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-01-15 18:07:41 +0000 |
commit | f4327898532fbd1c95d50f3a19b9d096668315fe (patch) | |
tree | 44128c6ea9c45d75ad100f1f0fe3b5b6f271d324 | |
parent | 1cf1f044fbfb3038ccc1eaca7e11ca0b7aa185c9 (diff) |
some code cleanup in enc_sha256
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2760 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | src/core/enc_sha256.c | 9 |
1 files changed, 3 insertions, 6 deletions
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<unsigned int>(strtoul(buf.c_str(), NULL, 10)); - i++; - } + std::stringstream sbuf(buf2); + for (i = 0; i < 8; i++) + sbuf >> salt[i]; } void SHA256Init(SHA256Context *ctx) |