1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-09-30 04:17:55 +02:00

check that mac always exists if key has MacKey

This commit is contained in:
Kyle Spearrin 2018-01-18 08:39:34 -05:00
parent 6f119f25f4
commit 01878ef00c

View File

@ -82,6 +82,11 @@ namespace Bit.App.Utilities
throw new ArgumentNullException(nameof(iv));
}
if(key.MacKey != null && mac == null)
{
throw new ArgumentNullException(nameof(mac));
}
if(key.EncryptionType != type)
{
throw new InvalidOperationException(nameof(type));