mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-10 01:05:42 +00:00
Fix ArgumentException usage in BlockCipher (#818)
Co-authored-by: Wojciech Nagórski <wojtpl2@gmail.com> Co-authored-by: Rob Hague <rob.hague00@gmail.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user