summaryrefslogtreecommitdiff
path: root/src/core/stdcrypt/utils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-11-27 19:09:16 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-11-27 19:09:16 +0000
commitcb80a37654ebc902769f87ffbadd38d161109333 (patch)
tree12b91f3d6920716b441c29aefa39dc858c264fe0 /src/core/stdcrypt/utils.cpp
parentab1971b510fb004fc23aa3a69565ce69d8d0743e (diff)
- 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
Diffstat (limited to 'src/core/stdcrypt/utils.cpp')
-rw-r--r--src/core/stdcrypt/utils.cpp6
1 files changed, 3 insertions, 3 deletions
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);
}