diff options
author | Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net> | 2011-06-27 06:56:26 -0700 |
---|---|---|
committer | Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net> | 2011-06-27 06:56:26 -0700 |
commit | 1c90f9fc2eba43be71f9d49dad75c5d0514d4e50 (patch) | |
tree | 63c1116ff43936475874b54d171c7e08556d54ee /src/utility.cpp | |
parent | 158b054e72582005d895f1ed0e1cb0c9b22a8e57 (diff) | |
parent | 7efe89ff584b2c0338dcede4c1e08504d0158780 (diff) | |
download | minetest-1c90f9fc2eba43be71f9d49dad75c5d0514d4e50.tar.gz minetest-1c90f9fc2eba43be71f9d49dad75c5d0514d4e50.tar.bz2 minetest-1c90f9fc2eba43be71f9d49dad75c5d0514d4e50.zip |
Merge pull request #13 from Bahamada/upstream_merge
Upstream merge
Diffstat (limited to 'src/utility.cpp')
-rw-r--r-- | src/utility.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utility.cpp b/src/utility.cpp index 186881c5a..0721100cb 100644 --- a/src/utility.cpp +++ b/src/utility.cpp @@ -229,10 +229,10 @@ std::string translatePassword(std::string playername, std::wstring password) if(password.length() == 0) return ""; - std::string slt=playername + wide_to_narrow(password); - SHA1 *sha1 = new SHA1(); - sha1->addBytes(slt.c_str(), slt.length()); - unsigned char *digest = sha1->getDigest(); + std::string slt = playername + wide_to_narrow(password); + SHA1 sha1; + sha1.addBytes(slt.c_str(), slt.length()); + unsigned char *digest = sha1.getDigest(); std::string pwd = base64_encode(digest, 20); free(digest); return pwd; |