mirror of
https://github.com/bitwarden/mobile
synced 2025-12-30 23:23:38 +00:00
deprecate mac checks on RSA decrypt
This commit is contained in:
@@ -400,15 +400,6 @@ namespace Bit.App.Services
|
||||
throw new ArgumentNullException(nameof(privateKey));
|
||||
}
|
||||
|
||||
if(EncKey?.MacKey != null && !string.IsNullOrWhiteSpace(encyptedValue.Mac))
|
||||
{
|
||||
var computedMacBytes = Crypto.ComputeMac(encyptedValue.CipherTextBytes, EncKey.MacKey);
|
||||
if(!Crypto.MacsEqual(computedMacBytes, encyptedValue.MacBytes))
|
||||
{
|
||||
throw new InvalidOperationException("MAC failed.");
|
||||
}
|
||||
}
|
||||
|
||||
IAsymmetricKeyAlgorithmProvider provider = null;
|
||||
switch(encyptedValue.EncryptionType)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user