de.flexiprovider.core.pbe
Class PBES2Parameters
java.lang.Object
|
+--java.security.AlgorithmParametersSpi
|
+--de.flexiprovider.api.parameters.AlgorithmParameters
|
+--de.flexiprovider.core.pbe.PBES2Parameters
- public class PBES2Parameters
- extends AlgorithmParameters
This class represents the parameters for the
passphrase based encryption scheme 2.
- Author:
- Thomas Wahrenbruch
|
Method Summary |
byte[] |
getEncoded()
Return the parameters encoded in their primary encoding format. |
byte[] |
getEncoded(java.lang.String format)
Return the parameters encoded in the specified encoding format. |
AlgorithmParameterSpec |
getParameterSpec(java.lang.Class paramSpec)
Return a transparent specification of the parameters. |
void |
init(AlgorithmParameterSpec params)
Initialize the parameters with the given parameter specification. |
void |
init(byte[] encParams)
Import the specified parameters and decode them according to the primary
decoding format. |
void |
init(byte[] encParams,
java.lang.String format)
Import the specified parameters and decode them according to the
specified decoding format. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PBES2Parameters
public PBES2Parameters()
init
public void init(AlgorithmParameterSpec params)
throws InvalidParameterSpecException
- Initialize the parameters with the given parameter specification.
Currently, only
PBES2ParameterSpec is supported as specification
type.
- Overrides:
init in class AlgorithmParameters
- Parameters:
params - the parameter specification- Throws:
InvalidParameterSpecException - if the parameter specification is not an instance of
PBES2ParameterSpec.
init
public void init(byte[] encParams)
throws java.io.IOException
- Import the specified parameters and decode them according to the primary
decoding format. The primary decoding format for parameters is ASN.1.
- Overrides:
init in class AlgorithmParameters
- Parameters:
encParams - the encoded parameters- Throws:
java.io.IOException - on decoding errors.
init
public void init(byte[] encParams,
java.lang.String format)
throws java.io.IOException
- Import the specified parameters and decode them according to the
specified decoding format. Currently, only the primary decoding format
("ASN.1") is supported.
- Overrides:
init in class AlgorithmParameters
- Parameters:
encParams - the encoded parametersformat - the decoding format- Throws:
java.io.IOException - on decoding errors or if the encoding format is
unsupported.
getEncoded
public byte[] getEncoded()
throws java.io.IOException
- Return the parameters encoded in their primary encoding format. The
primary encoding format for parameters is ASN.1.
- Overrides:
getEncoded in class AlgorithmParameters
- Returns:
- the encoded parameters
- Throws:
java.io.IOException - on encoding errors.
getEncoded
public byte[] getEncoded(java.lang.String format)
throws java.io.IOException
- Return the parameters encoded in the specified encoding format.
Currently, only the primary encoding format ("ASN.1") is supported.
- Overrides:
getEncoded in class AlgorithmParameters
- Parameters:
format - the decoding format- Returns:
- the encoded parameters
- Throws:
java.io.IOException - on encoding errors or if the encoding format is
unsupported.
getParameterSpec
public AlgorithmParameterSpec getParameterSpec(java.lang.Class paramSpec)
throws InvalidParameterSpecException
- Return a transparent specification of the parameters. Currently, only
PBES2ParameterSpec is supported as specification type.
- Overrides:
getParameterSpec in class AlgorithmParameters
- Parameters:
paramSpec - the desired parameter specification type- Returns:
- the parameter specification
- Throws:
InvalidParameterSpecException - if the parameter specification type is not assignable
from PBES2ParameterSpec.
toString
public java.lang.String toString()
- Overrides:
toString in class AlgorithmParameters
- Returns:
- a human readable form of the parameters