mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 23:25:45 +03:00
deprecate mac checks on RSA decrypt
This commit is contained in:
parent
5792372a47
commit
7ff628ea51
1 changed files with 0 additions and 9 deletions
|
@ -400,15 +400,6 @@ namespace Bit.App.Services
|
||||||
throw new ArgumentNullException(nameof(privateKey));
|
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;
|
IAsymmetricKeyAlgorithmProvider provider = null;
|
||||||
switch(encyptedValue.EncryptionType)
|
switch(encyptedValue.EncryptionType)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue