<PackageReference Include="BouncyCastle.Cryptography" Version="2.4.0" />

DataLengthException

This exception is thrown if a buffer that is meant to have output copied into it turns out to be too short, or if we've been given insufficient input.
using System; using System.Runtime.Serialization; namespace Org.BouncyCastle.Crypto { [Serializable] public class DataLengthException : CryptoException { public DataLengthException() { } public DataLengthException(string message) : base(message) { } public DataLengthException(string message, Exception innerException) : base(message, innerException) { } protected DataLengthException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }