APIdia Launch Partner
Top Description Fields Constructors Methods
javax.crypto.spec

public Class PBEParameterSpec

extends Object
implements AlgorithmParameterSpec
Class Inheritance
All Implemented Interfaces
java.security.spec.AlgorithmParameterSpec
Imports
java.security.spec.AlgorithmParameterSpec

This class specifies the set of parameters used with password-based encryption (PBE), as defined in the PKCS #5 standard.
Author
Jan Luehe
Since
1.4
External Specification
https://www.rfc-editor.org/info/rfc2898

Field Summary

Modifier and TypeField and Description
private final int
private AlgorithmParameterSpec
private final byte[]

Constructor Summary

AccessConstructor and Description
public
PBEParameterSpec(byte[]
the salt. The contents of salt are copied to protect against subsequent modification.
salt
,
int
the iteration count.
iterationCount
)

Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard.

public
PBEParameterSpec(byte[]
the salt. The contents of salt are copied to protect against subsequent modification.
salt
,
int
the iteration count.
iterationCount
,
AlgorithmParameterSpec
the cipher algorithm parameter specification, which may be null.
paramSpec
)

Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the iteration count
getIterationCount
()

Returns the iteration count.

public AlgorithmParameterSpec

Returns:

the parameter specification, or null if none was set.
getParameterSpec
()

Returns the cipher algorithm parameter specification.

public byte[]

Returns:

the salt. Returns a new array each time this method is called.
getSalt
()

Returns the salt.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

iterationCountback to summary
private final int iterationCount
paramSpecback to summary
private AlgorithmParameterSpec paramSpec
saltback to summary
private final byte[] salt

Constructor Detail

PBEParameterSpecback to summary
public PBEParameterSpec(byte[] salt, int iterationCount)

Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard.

Parameters
salt:byte[]

the salt. The contents of salt are copied to protect against subsequent modification.

iterationCount:int

the iteration count.

Exceptions
NullPointerException:
if salt is null.
PBEParameterSpecback to summary
public PBEParameterSpec(byte[] salt, int iterationCount, AlgorithmParameterSpec paramSpec)

Constructs a parameter set for password-based encryption as defined in the PKCS #5 standard.

Parameters
salt:byte[]

the salt. The contents of salt are copied to protect against subsequent modification.

iterationCount:int

the iteration count.

paramSpec:AlgorithmParameterSpec

the cipher algorithm parameter specification, which may be null.

Exceptions
NullPointerException:
if salt is null.
Since
1.8

Method Detail

getIterationCountback to summary
public int getIterationCount()

Returns the iteration count.

Returns:int

the iteration count

getParameterSpecback to summary
public AlgorithmParameterSpec getParameterSpec()

Returns the cipher algorithm parameter specification.

Returns:AlgorithmParameterSpec

the parameter specification, or null if none was set.

Since
1.8
getSaltback to summary
public byte[] getSalt()

Returns the salt.

Returns:byte[]

the salt. Returns a new array each time this method is called.