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

Org.BouncyCastle.Crypto.Paddings.Pkcs7Padding

A padder that adds PKCS7/PKCS5 padding to a block.
public string PaddingName { get; }

The algorithm name for the padding.

public Pkcs7Padding()

public int AddPadding(byte[] input, int inOff)

Add padding to a given block.

public int AddPadding(Span<byte> block, int position)

Add padding to a given block using Spans.

public void Init(SecureRandom random)

Initialise the padder.

public int PadCount(byte[] input)

Return the number of pad bytes found in the passed in block.

public int PadCount(ReadOnlySpan<byte> block)

Return the number of pad bytes found in the passed in block using Spans.