From cb80a37654ebc902769f87ffbadd38d161109333 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Nov 2013 19:09:16 +0000 Subject: - strong cyphering for passwords in db3x_mmap; - unique signature for the new mmap profiles; git-svn-id: http://svn.miranda-ng.org/main/trunk@6997 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdcrypt/utils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/stdcrypt/utils.cpp') diff --git a/src/core/stdcrypt/utils.cpp b/src/core/stdcrypt/utils.cpp index 3ef8b7bdf7..99b2d3c8db 100644 --- a/src/core/stdcrypt/utils.cpp +++ b/src/core/stdcrypt/utils.cpp @@ -342,7 +342,7 @@ static void sha256_final(SHA256_CONTEXT *hd, BYTE tmpHash[32]) #undef X } -static void make_sha256(const void *buf, size_t bufLen, BYTE tmpHash[32]) +static void make_sha256(const void *buf, size_t bufLen, BYTE *tmpHash) { SHA256_CONTEXT tmp; sha256_init(&tmp); @@ -350,10 +350,10 @@ static void make_sha256(const void *buf, size_t bufLen, BYTE tmpHash[32]) sha256_final(&tmp, tmpHash); } -void slow_hash(const void *buf, size_t bufLen, BYTE tmpHash[32]) +void slow_hash(const void *buf, size_t bufLen, BYTE* tmpHash) { make_sha256(buf, bufLen, tmpHash); for (int i = 0; i < 50000; i++) - make_sha256(tmpHash, sizeof(tmpHash), tmpHash); + make_sha256(tmpHash, 32, tmpHash); } -- cgit v1.2.3