Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Renci.SshNet/Security/Cryptography/BlockCipher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public override byte[] Encrypt(byte[] input, int offset, int length)
{
if (_padding is null)
{
throw new ArgumentException("data");
throw new ArgumentException(string.Format("The data block size is incorrect for {0}.", GetType().Name), "data");
}

var paddingLength = _blockSize - (length % _blockSize);
Expand Down Expand Up @@ -125,7 +125,7 @@ public override byte[] Decrypt(byte[] input, int offset, int length)
{
if (_padding is null)
{
throw new ArgumentException("data");
throw new ArgumentException(string.Format("The data block size is incorrect for {0}.", GetType().Name), "data");
}

input = _padding.Pad(_blockSize, input, offset, length);
Expand Down