VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Crypto.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-01-01 00:48:39 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-01-03 00:14:59 +0100
commit4181283f2968ccd3efe2fa3b9e49f5b70d174926 (patch)
treed63f974b8734e1a34610528d851b8d402ff5a887 /src/Common/Crypto.c
parentbb66dac8e677e44050367c97404d10f73e992a3c (diff)
downloadVeraCrypt-4181283f2968ccd3efe2fa3b9e49f5b70d174926.tar.gz
VeraCrypt-4181283f2968ccd3efe2fa3b9e49f5b70d174926.zip
Cryptography: Set 16-byte alignment for KEY_INFO structure that is used as input for Whirlpool hash. This helps improve performance.
Diffstat (limited to 'src/Common/Crypto.c')
-rw-r--r--src/Common/Crypto.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Common/Crypto.c b/src/Common/Crypto.c
index e7a40a30..fcc4c3b8 100644
--- a/src/Common/Crypto.c
+++ b/src/Common/Crypto.c
@@ -739,12 +739,14 @@ PCRYPTO_INFO crypto_open ()
#endif // TC_WINDOWS_BOOT
}
+#ifndef TC_WINDOWS_BOOT
void crypto_loadkey (PKEY_INFO keyInfo, char *lpszUserKey, int nUserKeyLen)
{
keyInfo->keyLength = nUserKeyLen;
burn (keyInfo->userKey, sizeof (keyInfo->userKey));
memcpy (keyInfo->userKey, lpszUserKey, nUserKeyLen);
}
+#endif
void crypto_close (PCRYPTO_INFO cryptoInfo)
{