From 68f16dae244752e8bdf112e8feeb6a0839088a3e Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Tue, 14 Oct 2014 17:14:54 +0200 Subject: Implement support for creating and booting encrypted partition using SHA-256. Support SHA-256 for normal volumes as well. --- src/Common/EncryptionThreadPool.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Common/EncryptionThreadPool.c') diff --git a/src/Common/EncryptionThreadPool.c b/src/Common/EncryptionThreadPool.c index f213ea34..1ec78139 100644 --- a/src/Common/EncryptionThreadPool.c +++ b/src/Common/EncryptionThreadPool.c @@ -173,6 +173,11 @@ static TC_THREAD_PROC EncryptionThreadProc (void *threadArg) workItem->KeyDerivation.IterationCount, workItem->KeyDerivation.DerivedKey, GetMaxPkcs5OutSize()); break; + case SHA256: + derive_key_sha256 (workItem->KeyDerivation.Password, workItem->KeyDerivation.PasswordLength, workItem->KeyDerivation.Salt, PKCS5_SALT_SIZE, + workItem->KeyDerivation.IterationCount, workItem->KeyDerivation.DerivedKey, GetMaxPkcs5OutSize()); + break; + default: TC_THROW_FATAL_EXCEPTION; } -- cgit v1.2.3