summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDukePyrolator <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-15 18:07:41 +0000
committerDukePyrolator <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-15 18:07:41 +0000
commitf4327898532fbd1c95d50f3a19b9d096668315fe (patch)
tree44128c6ea9c45d75ad100f1f0fe3b5b6f271d324 /src
parent1cf1f044fbfb3038ccc1eaca7e11ca0b7aa185c9 (diff)
some code cleanup in enc_sha256
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2760 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/core/enc_sha256.c9
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)