Top Description Fields Constructors Methods
org.bouncycastle.crypto.agreement.kdf

public Class ConcatenationKDFGenerator

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.KDFParameters

Generator for Concatenation Key Derivation Function defined in NIST SP 800-56A, Sect 5.8.1

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
ConcatenationKDFGenerator(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
otherInfoback to summary
private byte[] otherInfo
sharedback to summary
private byte[] shared

Constructor Detail

ConcatenationKDFGeneratorback to summary
public ConcatenationKDFGenerator(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.