Top Description Inners Methods
org.bouncycastle.crypto

public Interface PasswordBasedDeriver<T>

Known Direct Implementers
org.bouncycastle.crypto.internal.PBEParametersGenerator
Type Parameters
<T>
the parameters type for the deriver.

Base interface for a password based deriver of bytes for symmetric keys.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
PasswordBasedDeriver.KeyType

The target key type we are trying to produce a key for.

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

a byte array containing the raw key data.
deriveKey
(PasswordBasedDeriver.KeyType
type of key to be calculated.
keyType
,
int
the number of bytes to be produced.
keySizeInBytes
)

Derive a key of the given keySizeInBytes length.

public byte[][]

Returns:

a 2 element byte[] array containing the raw key data in element 0, the iv in element 1.
deriveKeyAndIV
(PasswordBasedDeriver.KeyType
type of key to be calculated.
keyType
,
int
the number of bytes to be produced.
keySizeInBytes
,
int
the number of bytes to be produced.
ivSizeInBytes
)

Derive a key of the given keySizeInBytes length and an iv of ivSizeInBytes length.

public T

Returns:

the deriver's parameters.
getParameters
()

Return the parameters for this deriver.

Method Detail

deriveKeyback to summary
public byte[] deriveKey(PasswordBasedDeriver.KeyType keyType, int keySizeInBytes)

Derive a key of the given keySizeInBytes length.

Parameters
keyType:PasswordBasedDeriver.KeyType

type of key to be calculated.

keySizeInBytes:int

the number of bytes to be produced.

Returns:byte[]

a byte array containing the raw key data.

deriveKeyAndIVback to summary
public byte[][] deriveKeyAndIV(PasswordBasedDeriver.KeyType keyType, int keySizeInBytes, int ivSizeInBytes)

Derive a key of the given keySizeInBytes length and an iv of ivSizeInBytes length.

Parameters
keyType:PasswordBasedDeriver.KeyType

type of key to be calculated.

keySizeInBytes:int

the number of bytes to be produced.

ivSizeInBytes:int

the number of bytes to be produced.

Returns:byte[][]

a 2 element byte[] array containing the raw key data in element 0, the iv in element 1.

getParametersback to summary
public T getParameters()

Return the parameters for this deriver.

Returns:T

the deriver's parameters.

org.bouncycastle.crypto back to summary

public final Enum PasswordBasedDeriver.KeyType

extends Enum<PasswordBasedDeriver.KeyType>
Class Inheritance

The target key type we are trying to produce a key for.

Field Summary

Modifier and TypeField and Description
public static final PasswordBasedDeriver.KeyType
CIPHER

Target key for a symmetric cipher.

public static final PasswordBasedDeriver.KeyType
MAC

Target key for a MAC.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PasswordBasedDeriver.KeyType
public static PasswordBasedDeriver.KeyType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CIPHERback to summary
public static final PasswordBasedDeriver.KeyType CIPHER

Target key for a symmetric cipher.

MACback to summary
public static final PasswordBasedDeriver.KeyType MAC

Target key for a MAC.

Constructor Detail

KeyTypeback to summary
private KeyType()

Method Detail

valueOfback to summary
public static PasswordBasedDeriver.KeyType valueOf(String name)
valuesback to summary
public static PasswordBasedDeriver.KeyType[] values()