Linux/macOS: Implement missing Argon2 KDF support on Unix

This commit is contained in:
Mounir IDRASSI
2026-04-18 00:20:32 +09:00
parent e07bd19f20
commit e59eb421fb
81 changed files with 848 additions and 226 deletions

View File

@@ -107,7 +107,14 @@ namespace VeraCrypt
if (kdf && (kdf->GetName() != pkcs5->GetName()))
continue;
pkcs5->DeriveKey (headerKey, password, pim, salt);
int derivationResult = pkcs5->DeriveKey (headerKey, password, pim, salt);
if (derivationResult != 0)
{
if (!kdf)
continue;
throw ExternalException (SRC_POS, pkcs5->GetDerivationFailureMessage (derivationResult));
}
foreach (shared_ptr <EncryptionMode> mode, encryptionModes)
{