public class

FixedLengthMGF1Padder

extends Object
implements EncryptedValuePadder
java.lang.Object
   ↳ org.bouncycastle.cert.crmf.FixedLengthMGF1Padder

Class Overview

An encrypted value padder that uses MGF1 as the basis of the padding.

Summary

Public Constructors
FixedLengthMGF1Padder(int length)
Create a padder to so that padded output will always be at least length bytes long.
FixedLengthMGF1Padder(int length, SecureRandom random)
Create a padder to so that padded output will always be at least length bytes long, using the passed in source of randomness to provide the random material for the padder.
Public Methods
byte[] getPaddedData(byte[] data)
Return a byte array of padded data.
byte[] getUnpaddedData(byte[] paddedData)
Return a byte array of with padding removed.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.bouncycastle.cert.crmf.EncryptedValuePadder

Public Constructors

public FixedLengthMGF1Padder (int length)

Create a padder to so that padded output will always be at least length bytes long.

Parameters
length fixed length for padded output.

public FixedLengthMGF1Padder (int length, SecureRandom random)

Create a padder to so that padded output will always be at least length bytes long, using the passed in source of randomness to provide the random material for the padder.

Parameters
length fixed length for padded output.
random a source of randomness.

Public Methods

public byte[] getPaddedData (byte[] data)

Return a byte array of padded data.

Parameters
data the data to be padded.
Returns
  • a padded byte array containing data.

public byte[] getUnpaddedData (byte[] paddedData)

Return a byte array of with padding removed.

Parameters
paddedData the data to be padded.
Returns
  • an array containing the original unpadded data.