From 6f2bd00100522615ff8a5dda1166a4b3312879d0 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Wed, 23 Apr 2008 09:17:52 +0000 Subject: Replaced SHA-256 implementation with the one from InspIRCd. Thanks to Bertram for initial modifications. --- src/net/accountserver/accountserver.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/net/accountserver/accountserver.cpp') diff --git a/src/net/accountserver/accountserver.cpp b/src/net/accountserver/accountserver.cpp index a641ab47..db94563b 100644 --- a/src/net/accountserver/accountserver.cpp +++ b/src/net/accountserver/accountserver.cpp @@ -24,7 +24,6 @@ #include "accountserver.h" #include -#include "../../utils/encryption.h" #include "internal.h" @@ -32,6 +31,8 @@ #include "../messageout.h" #include "../protocol.h" +#include "../../utils/sha256.h" + void Net::AccountServer::login(Net::Connection *connection, int version, const std::string &username, const std::string &password) { @@ -41,9 +42,7 @@ void Net::AccountServer::login(Net::Connection *connection, int version, msg.writeInt32(version); msg.writeString(username); - // The password is hashed - msg.writeString(Encryption::GetSHA2Hash( - std::string (username + password))); + msg.writeString(sha256(username + password)); Net::AccountServer::connection->send(msg); } -- cgit v1.2.3-60-g2f50