Improve error message for bad encrypted int

This commit is contained in:
Kurt 2020-04-26 18:30:23 -07:00
parent ce5706be90
commit de6190ed79

View File

@ -55,7 +55,7 @@ public static EncryptedInt32 ReadVerify(byte[] data, int offset)
{
var val = Read(data, offset);
if (val.Checksum != CalculateChecksum(val.OriginalEncrypted))
throw new ArgumentException(nameof(offset));
throw new ArgumentException($"Failed to verify the {nameof(EncryptedInt32)} at {nameof(offset)}");
return val;
}