diff options
-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) |