VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Crypto.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2014-10-26 00:33:18 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2014-11-08 23:24:19 +0100
commitc1378f781aaaa4d9e57c0a383cded7173bde7663 (patch)
tree9d4e7e86c93a8e86a839bd95b233682cd56bdf64 /src/Common/Crypto.h
parentc61f8c70de2179a27f7c40c80b65ce1ee5253286 (diff)
downloadVeraCrypt-c1378f781aaaa4d9e57c0a383cded7173bde7663.tar.gz
VeraCrypt-c1378f781aaaa4d9e57c0a383cded7173bde7663.zip
Bootloader: optimize code size in single cipher mode by manually inlining EAInit, EAGetFirst and EAGetKeySize, and by removing the loop in ReadVolumeHeader that tests for encryption algorithms.
Diffstat (limited to 'src/Common/Crypto.h')
-rw-r--r--src/Common/Crypto.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Common/Crypto.h b/src/Common/Crypto.h
index 7875e1a5..a6ed56d2 100644
--- a/src/Common/Crypto.h
+++ b/src/Common/Crypto.h
@@ -259,7 +259,11 @@ const
char * CipherGetName (int cipher);
int CipherInit (int cipher, unsigned char *key, unsigned char *ks);
+#ifndef TC_WINDOWS_BOOT_SINGLE_CIPHER_MODE
int EAInit (int ea, unsigned char *key, unsigned char *ks);
+#else
+int EAInit (unsigned char *key, unsigned char *ks);
+#endif
BOOL EAInitMode (PCRYPTO_INFO ci);
void EncipherBlock(int cipher, void *data, void *ks);
void DecipherBlock(int cipher, void *data, void *ks);