Update to BouncyCastle 1.9.0

This commit is contained in:
BruceChen 2022-08-25 21:29:33 +08:00
parent ed8e97fd2d
commit a3971f9097
9 changed files with 392 additions and 115 deletions

View file

@ -12,13 +12,13 @@ namespace Org.BouncyCastle.Crypto
internal static void DataLength(byte[] buf, int off, int len, string msg)
{
if (off + len > buf.Length)
if (off > (buf.Length - len))
throw new DataLengthException(msg);
}
internal static void OutputLength(byte[] buf, int off, int len, string msg)
{
if (off + len > buf.Length)
if (off > (buf.Length - len))
throw new OutputLengthException(msg);
}
}