bug fixes

This commit is contained in:
Kyle Spearrin 2019-04-19 16:57:34 -04:00
parent 7548122e2d
commit ea5a411f30
2 changed files with 3 additions and 3 deletions

View file

@ -42,7 +42,7 @@ namespace Bit.Core.Models.Domain
EncKey = new ArraySegment<byte>(Key, 0, 16).ToArray();
MacKey = new ArraySegment<byte>(Key, 16, 16).ToArray();
}
else if(EncType == EncryptionType.AesCbc256_HmacSha256_B64 && Key.Length == 34)
else if(EncType == EncryptionType.AesCbc256_HmacSha256_B64 && Key.Length == 64)
{
EncKey = new ArraySegment<byte>(Key, 0, 32).ToArray();
MacKey = new ArraySegment<byte>(Key, 32, 32).ToArray();

View file

@ -613,9 +613,9 @@ namespace Bit.Core.Services
Buffer.BlockCopy(dataBytes, 0, macDataBytes, ivBytes.Length, dataBytes.Length);
byte[] macKey = null;
if(key.MacKey != null)
if(theKey.MacKey != null)
{
macKey = key.MacKey;
macKey = theKey.MacKey;
}
byte[] macBytes = null;
if(mac != null)