fix error with using native libary on Android, now allowing AesKdf again
This commit is contained in:
@@ -120,9 +120,15 @@ namespace KeePassLib.Cryptography.KeyDerivation
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Try to use the native library first
|
// Try to use the native library first
|
||||||
if(NativeLib.TransformKey256(pbNewKey, pbKeySeed32, uNumRounds))
|
if (NativeLib.TransformKey256(pbNewKey, pbKeySeed32, uNumRounds))
|
||||||
return CryptoUtil.HashSha256(pbNewKey);
|
{
|
||||||
|
byte[] pbKey = new byte[32];
|
||||||
|
Array.Copy(pbNewKey, pbKey, pbNewKey.Length);
|
||||||
|
|
||||||
|
return pbKey;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if(TransformKeyManaged(pbNewKey, pbKeySeed32, uNumRounds))
|
if(TransformKeyManaged(pbNewKey, pbKeySeed32, uNumRounds))
|
||||||
return CryptoUtil.HashSha256(pbNewKey);
|
return CryptoUtil.HashSha256(pbNewKey);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user