Top Description Fields Constructors Methods
org.bouncycastle.crypto.generators

public Class MGF1BytesGenerator

extends Object
implements DerivationFunction
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.DerivationFunction
Imports
org.bouncycastle.crypto.DataLengthException, .DerivationFunction, .DerivationParameters, .Digest, .OutputLengthException, org.bouncycastle.crypto.params.MGFParameters

Generator for MGF1 as defined in PKCS 1v2

Field Summary

Modifier and TypeField and Description
private Digest
private int
private byte[]

Constructor Summary

AccessConstructor and Description
public
MGF1BytesGenerator(Digest
the digest to be used as the source of generated bytes
digest
)

Method Summary

Modifier and TypeMethod and Description
public int
generateBytes(byte[] out, int outOff, int len)

Implements org.bouncycastle.crypto.DerivationFunction.generateBytes.

fill len bytes of the output buffer with bytes generated from the derivation function.
public Digest
getDigest()

return the underlying digest.

public void
private void
ItoOSP(int i, byte[] sp)

int to octet string.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

digestback to summary
private Digest digest
hLenback to summary
private int hLen
seedback to summary
private byte[] seed

Constructor Detail

MGF1BytesGeneratorback to summary
public MGF1BytesGenerator(Digest digest)
Parameters
digest:Digest

the digest to be used as the source of generated bytes

Method Detail

generateBytesback to summary
public int generateBytes(byte[] out, int outOff, int len) throws DataLengthException, IllegalArgumentException

Implements org.bouncycastle.crypto.DerivationFunction.generateBytes.

fill len bytes of the output buffer with bytes generated from the derivation function.

Exceptions
DataLengthException:
if the out buffer is too small.
getDigestback to summary
public Digest getDigest()

return the underlying digest.

initback to summary
public void init(DerivationParameters param)

Implements org.bouncycastle.crypto.DerivationFunction.init.

ItoOSPback to summary
private void ItoOSP(int i, byte[] sp)

int to octet string.