From 70c57928e787801d16c453abe38138015ee88392 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 26 Apr 2017 11:28:03 -0400 Subject: [PATCH] Compat. - no header for AesCbc256_B64 cipherstring --- src/App/Models/CipherString.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/App/Models/CipherString.cs b/src/App/Models/CipherString.cs index 2de058404..ea435e4ec 100644 --- a/src/App/Models/CipherString.cs +++ b/src/App/Models/CipherString.cs @@ -83,13 +83,18 @@ namespace Bit.App.Models } EncryptionType = encryptionType; - EncryptedString = string.Format("{0}.{1}|{2}", (byte)encryptionType, initializationVector, cipherText); + EncryptedString = string.Format("{0}|{1}", initializationVector, cipherText); if(!string.IsNullOrWhiteSpace(mac)) { EncryptedString = string.Format("{0}|{1}", EncryptedString, mac); } + if(EncryptionType != EncryptionType.AesCbc256_B64) + { + EncryptedString = string.Format("{0}.{1}", (byte)EncryptionType, EncryptedString); + } + CipherText = cipherText; InitializationVector = initializationVector; Mac = mac;