de.flexiprovider.core.pbe
Class PBEParameters
java.lang.Object
|
+--java.security.AlgorithmParametersSpi
|
+--de.flexiprovider.api.parameters.AlgorithmParameters
|
+--de.flexiprovider.core.pbe.interfaces.PBEParameters
|
+--de.flexiprovider.core.pbe.PBEParameters
- public class PBEParameters
- extends PBEParameters
This class represents parameters for passphrase based encryption.
- Author:
- Thomas Wahrenbruch
|
Method Summary |
byte[] |
getEncoded()
Return the parameters in their primary encoding format. |
byte[] |
getEncoded(java.lang.String format)
Return the parameters in the specified encoding format. |
AlgorithmParameterSpec |
getParameterSpec(java.lang.Class paramSpec)
Return a transparent specification of this parameters object. |
void |
init(AlgorithmParameterSpec paramSpec)
Initialize this parameters object using the specified parameters. |
void |
init(byte[] enc)
Import the specified parameters and decodes them according to the primary
decoding format (ASN.1) for parameters. |
void |
init(byte[] enc,
java.lang.String format)
Import the specified parameters and decodes 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 |
PBEParameters
public PBEParameters()
init
public void init(AlgorithmParameterSpec paramSpec)
throws InvalidParameterSpecException
- Initialize this parameters object using the specified parameters.
Currently, only
PBEParameterSpec is supported as specification
type.
- Overrides:
init in class AlgorithmParameters
- Parameters:
paramSpec - the parameter specification- Throws:
InvalidParameterSpecException - if the parameter specification is not an instance of
PBEParameterSpec.
init
public void init(byte[] enc)
throws java.io.IOException
- Import the specified parameters and decodes them according to the primary
decoding format (ASN.1) for parameters.
- Overrides:
init in class AlgorithmParameters
- Parameters:
enc - the encoded parameters- Throws:
java.io.IOException - on decoding errors.
init
public void init(byte[] enc,
java.lang.String format)
throws java.io.IOException
- Import the specified parameters and decodes them according to the
specified decoding format. If format is null, the primary
decoding format for parameters (ASN.1) is used. Currently, only the
default decoding format is supported.
- Overrides:
init in class AlgorithmParameters
- Parameters:
enc - the encoded parametersformat - the decoding format- Throws:
java.io.IOException - on decoding errors.
getEncoded
public byte[] getEncoded()
throws java.io.IOException
- Return the parameters in their primary encoding format. The primary
encoding format for parameters is ASN.1.
- Overrides:
getEncoded in class AlgorithmParameters
- Returns:
- the ASN.1 encoded parameters
- Throws:
java.io.IOException - on encoding errors.
getEncoded
public byte[] getEncoded(java.lang.String format)
throws java.io.IOException
- Return the parameters in the specified encoding format. If
format is null, the primary encoding format for parameters
(ASN.1) is used. Currently, only the default encoding format is
supported.
- Overrides:
getEncoded in class AlgorithmParameters
- Parameters:
format - the encoding format- Returns:
- the ASN.1 encoded parameters
- Throws:
java.io.IOException - on encoding errors.
getParameterSpec
public AlgorithmParameterSpec getParameterSpec(java.lang.Class paramSpec)
throws InvalidParameterSpecException
- Return a transparent specification of this parameters object. Currently,
only
PBEParameterSpecis supported as specification type.
- Overrides:
getParameterSpec in class AlgorithmParameters
- Parameters:
paramSpec - the the specification class in which the parameters should
be returned- Returns:
- the parameter specification
- Throws:
InvalidParameterSpecException - if the parameter specification type is not assignable
from PBEParameterSpec.
toString
public java.lang.String toString()
- Overrides:
toString in class AlgorithmParameters
- Returns:
- a human readable form of the parameters