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

Org.BouncyCastle.Crypto.Paddings.ISO7816d4Padding

A padder that adds the padding according to the scheme referenced in ISO 7814-4 - scheme 2 from ISO 9797-1. The first byte is 0x80, rest is 0x00
namespace Org.BouncyCastle.Crypto.Paddings { public class ISO7816d4Padding : IBlockCipherPadding { public string PaddingName { get; } public void Init(SecureRandom random); public int AddPadding(byte[] input, int inOff); public int AddPadding(Span<byte> block, int position); public int PadCount(byte[] input); public int PadCount(ReadOnlySpan<byte> block); public ISO7816d4Padding(); } }