org.bouncycastle.crypto.generators

Class MGF1BytesGenerator

public class MGF1BytesGenerator extends Object implements DerivationFunction

Generator for MGF1 as defined in PKCS 1v2
Constructor Summary
MGF1BytesGenerator(Digest digest)
Method Summary
intgenerateBytes(byte[] out, int outOff, int len)
fill len bytes of the output buffer with bytes generated from the derivation function.
DigestgetDigest()
return the underlying digest.
voidinit(DerivationParameters param)

Constructor Detail

MGF1BytesGenerator

public MGF1BytesGenerator(Digest digest)

Parameters: digest the digest to be used as the source of generated bytes

Method Detail

generateBytes

public int generateBytes(byte[] out, int outOff, int len)
fill len bytes of the output buffer with bytes generated from the derivation function.

Throws: DataLengthException if the out buffer is too small.

getDigest

public Digest getDigest()
return the underlying digest.

init

public void init(DerivationParameters param)