diff --git a/src/App/Utilities/Crypto.cs b/src/App/Utilities/Crypto.cs index 46c6fdef8..36eb9f8b8 100644 --- a/src/App/Utilities/Crypto.cs +++ b/src/App/Utilities/Crypto.cs @@ -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));