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

IBlockCipherPadding

public interface IBlockCipherPadding
Block cipher padders are expected to conform to this interface.
string PaddingName { get; }

The name of the algorithm this padder implements.

int AddPadding(byte[] input, int inOff)

Add padding to the passed in block.

void Init(SecureRandom random)

Initialise the padder.

int PadCount(byte[] input)

Determine the length of padding present in the passed in block.