Table of Contents

Class ISO10126d2Padding

Namespace
Org.BouncyCastle.Crypto.Paddings
Assembly
BouncyCastle.Cryptography.dll

A padder that adds ISO10126-2 padding to a block.

public class ISO10126d2Padding : IBlockCipherPadding
Inheritance
ISO10126d2Padding
Implements
Inherited Members

Properties

PaddingName

The name of the algorithm this padder implements.

public string PaddingName { get; }

Property Value

string

Methods

AddPadding(byte[], int)

Add padding to the passed in block.

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

Parameters

input byte[]

the block to add padding to.

inOff int

the offset into the block the padding is to start at.

Returns

int

the number of bytes of padding added.

AddPadding(Span<byte>, int)

Add padding to the passed in block.

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

Parameters

block Span<byte>

the block to add padding to.

position int

the offset into the block the padding is to start at.

Returns

int

the number of bytes of padding added.

Init(SecureRandom)

Initialise the padder.

public void Init(SecureRandom random)

Parameters

random SecureRandom

A source of randomness, if any required.

PadCount(byte[])

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

public int PadCount(byte[] input)

Parameters

input byte[]

the block to check padding for.

Returns

int

the number of bytes of padding present.

PadCount(ReadOnlySpan<byte>)

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

public int PadCount(ReadOnlySpan<byte> block)

Parameters

block ReadOnlySpan<byte>

the block to check padding for.

Returns

int

the number of bytes of padding present.