fix error with using native libary on Android, now allowing AesKdf again

This commit is contained in:
Philipp Crocoll 2016-09-05 11:17:53 +02:00
parent 6c043e9b79
commit e4c17e2e27
1 changed files with 8 additions and 2 deletions

View File

@ -120,9 +120,15 @@ namespace KeePassLib.Cryptography.KeyDerivation
try
{
// Try to use the native library first
if(NativeLib.TransformKey256(pbNewKey, pbKeySeed32, uNumRounds))
return CryptoUtil.HashSha256(pbNewKey);
if (NativeLib.TransformKey256(pbNewKey, pbKeySeed32, uNumRounds))
{
byte[] pbKey = new byte[32];
Array.Copy(pbNewKey, pbKey, pbNewKey.Length);
return pbKey;
}
if(TransformKeyManaged(pbNewKey, pbKeySeed32, uNumRounds))
return CryptoUtil.HashSha256(pbNewKey);
}