From d14b23ca8253789fac6c9c4a55c6e40ce34f1936 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sun, 23 Jul 2017 00:10:32 -0400 Subject: [PATCH] null check for mac --- src/App/Utilities/Crypto.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App/Utilities/Crypto.cs b/src/App/Utilities/Crypto.cs index b4176c4c1..46c6fdef8 100644 --- a/src/App/Utilities/Crypto.cs +++ b/src/App/Utilities/Crypto.cs @@ -13,7 +13,7 @@ namespace Bit.App.Utilities { var parts = AesCbcEncryptToParts(plainBytes, key); return new CipherString(parts.Item1, Convert.ToBase64String(parts.Item2), - Convert.ToBase64String(parts.Item4), Convert.ToBase64String(parts.Item3)); + Convert.ToBase64String(parts.Item4), parts.Item3 != null ? Convert.ToBase64String(parts.Item3) : null); } public static byte[] AesCbcEncryptToBytes(byte[] plainBytes, SymmetricCryptoKey key)