diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-11-25 01:41:37 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-11-26 01:44:52 +0100 |
commit | 90bd57fe40e66fc829ecb01482d32d604b0df19c (patch) | |
tree | 6d6de0d9a31c82d0598f68c2d160cb9e565bd5ea /src/Common/Crypto.h | |
parent | ec7d96fcb733021c214b414a1ba2841039733dd2 (diff) | |
download | VeraCrypt-90bd57fe40e66fc829ecb01482d32d604b0df19c.tar.gz VeraCrypt-90bd57fe40e66fc829ecb01482d32d604b0df19c.zip |
Windows: Full UNICODE rewrite and implement support for UNICODE passwords.
Diffstat (limited to 'src/Common/Crypto.h')
-rw-r--r-- | src/Common/Crypto.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/Common/Crypto.h b/src/Common/Crypto.h index 073616cd..51539765 100644 --- a/src/Common/Crypto.h +++ b/src/Common/Crypto.h @@ -112,7 +112,11 @@ enum typedef struct
{
int Id; // Cipher ID
+#ifdef TC_WINDOWS_BOOT
char *Name; // Name
+#else
+ wchar_t *Name; // Name
+#endif
int BlockSize; // Block size (bytes)
int KeySize; // Key size (bytes)
int KeyScheduleSize; // Scheduled key size (bytes)
@@ -125,13 +129,15 @@ typedef struct int FormatEnabled;
} EncryptionAlgorithm;
+#ifndef TC_WINDOWS_BOOT
typedef struct
{
int Id; // Hash ID
- char *Name; // Name
+ wchar_t *Name; // Name
BOOL Deprecated;
BOOL SystemEncryption; // Available for system encryption
} Hash;
+#endif
// Maxium length of scheduled key
#if !defined (TC_WINDOWS_BOOT) || defined (TC_WINDOWS_BOOT_AES)
@@ -276,9 +282,8 @@ int CipherGetKeyScheduleSize (int cipher); BOOL CipherSupportsIntraDataUnitParallelization (int cipher);
#ifndef TC_WINDOWS_BOOT
-const
+const wchar_t * CipherGetName (int cipher);
#endif
-char * CipherGetName (int cipher);
int CipherInit (int cipher, unsigned char *key, unsigned char *ks);
#ifndef TC_WINDOWS_BOOT_SINGLE_CIPHER_MODE
@@ -297,12 +302,16 @@ void DecipherBlocks (int cipher, void *dataPtr, void *ks, size_t blockCount); int EAGetFirst ();
int EAGetCount (void);
int EAGetNext (int previousEA);
-char * EAGetName (char *buf, int ea, int guiDisplay);
-int EAGetByName (char *name);
+#ifndef TC_WINDOWS_BOOT
+wchar_t * EAGetName (wchar_t *buf, int ea, int guiDisplay);
+int EAGetByName (wchar_t *name);
+#endif
int EAGetKeySize (int ea);
int EAGetFirstMode (int ea);
int EAGetNextMode (int ea, int previousModeId);
-char * EAGetModeName (int ea, int mode, BOOL capitalLetters);
+#ifndef TC_WINDOWS_BOOT
+wchar_t * EAGetModeName (int ea, int mode, BOOL capitalLetters);
+#endif
int EAGetKeyScheduleSize (int ea);
int EAGetLargestKey ();
int EAGetLargestKeyForMode (int mode);
@@ -317,13 +326,10 @@ BOOL EAIsModeSupported (int ea, int testedMode); #ifndef TC_WINDOWS_BOOT
-const
-#endif
-char *HashGetName (int hash_algo_id);
+const wchar_t *HashGetName (int hash_algo_id);
-#ifndef TC_WINDOWS_BOOT
Hash *HashGet (int id);
-void HashGetName2 (char *buf, int hashId);
+void HashGetName2 (wchar_t *buf, int hashId);
BOOL HashIsDeprecated (int hashId);
BOOL HashForSystemEncryption (int hashId);
int GetMaxPkcs5OutSize (void);
|