diff --git a/src/Renci.SshNet/Security/Cryptography/BlockCipher.cs b/src/Renci.SshNet/Security/Cryptography/BlockCipher.cs index 3e7e6541..26aa6d1b 100644 --- a/src/Renci.SshNet/Security/Cryptography/BlockCipher.cs +++ b/src/Renci.SshNet/Security/Cryptography/BlockCipher.cs @@ -78,7 +78,7 @@ namespace Renci.SshNet.Security.Cryptography { 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); @@ -125,7 +125,7 @@ namespace Renci.SshNet.Security.Cryptography { 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);