com.ibm.crypto.fips.provider
Class DSAParameters
- java.lang.Object
-
- java.security.AlgorithmParametersSpi
-
- com.ibm.crypto.fips.provider.DSAParameters
-
public final class DSAParameters extends java.security.AlgorithmParametersSpiThis class implements Digital Signature Algorithm paremters specified by com.ibm.crypto.fips.provider 186 standard.
-
-
Field Summary
Fields Modifier and Type Field and Description protected java.math.BigIntegergprotected java.math.BigIntegerpprotected java.math.BigIntegerq
-
Constructor Summary
Constructors Constructor and Description DSAParameters()
-
Method Summary
Methods Modifier and Type Method and Description protected byte[]engineGetEncoded()Returns the parameters in encoded bytes.protected byte[]engineGetEncoded(java.lang.String encodingMethod)Returns the parameters in encoded bytes with encoding method specified.protected java.security.spec.AlgorithmParameterSpecengineGetParameterSpec(java.lang.Class paramSpec)Return the parameter spec used by this parameter instance.protected voidengineInit(java.security.spec.AlgorithmParameterSpec paramSpec)Initialize the DSAParameters by a DSAParameterSpecprotected voidengineInit(byte[] params)Initialize the DSAParameters by encoded bytesprotected voidengineInit(byte[] params, java.lang.String decodingMethod)Initialize the DSAParameters by encoded bytes with the specified decoding method.protected java.lang.StringengineToString()protected byte[]internalGetEncoded()Returns the parameters in encoded bytes.protected byte[]internalGetEncoded(java.lang.String encodingMethod)Returns the parameters in encoded bytes with encoding method specified.protected java.security.spec.AlgorithmParameterSpecinternalGetParameterSpec(java.lang.Class paramSpec)Return the parameter spec used by this parameter instance.protected voidinternalInit(java.security.spec.AlgorithmParameterSpec paramSpec)Initialize the DSAParameters by a DSAParameterSpecprotected voidinternalInit(byte[] params)Initialize the DSAParameters by encoded bytesprotected voidinternalInit(byte[] params, java.lang.String decodingMethod)Initialize the DSAParameters by encoded bytes with the specified decoding method.protected java.lang.StringinternalToString()
-
-
-
Field Detail
-
p
protected java.math.BigInteger p
-
q
protected java.math.BigInteger q
-
g
protected java.math.BigInteger g
-
-
Method Detail
-
engineInit
protected void engineInit(java.security.spec.AlgorithmParameterSpec paramSpec) throws java.security.spec.InvalidParameterSpecExceptionInitialize the DSAParameters by a DSAParameterSpec- Specified by:
engineInitin classjava.security.AlgorithmParametersSpi- Parameters:
paramSpec- the DSA algorithm parameter spec for this instance.- Throws:
FIPSRuntimeException- if SelfTest.isFipsRunnable returns false.java.security.spec.InvalidParameterSpecException
-
internalInit
protected void internalInit(java.security.spec.AlgorithmParameterSpec paramSpec) throws java.security.spec.InvalidParameterSpecExceptionInitialize the DSAParameters by a DSAParameterSpec- Parameters:
paramSpec- the DSA algorithm parameter spec for this instance.- Throws:
java.security.spec.InvalidParameterSpecException
-
engineInit
protected void engineInit(byte[] params) throws java.io.IOExceptionInitialize the DSAParameters by encoded bytes- Specified by:
engineInitin classjava.security.AlgorithmParametersSpi- Parameters:
params- the encoded bytes of the parameters.- Throws:
FIPSRuntimeException- if SelfTest.isFipsRunnable returns false.java.io.IOException
-
internalInit
protected void internalInit(byte[] params) throws java.io.IOExceptionInitialize the DSAParameters by encoded bytes- Parameters:
params- the encoded bytes of the parameters.- Throws:
java.io.IOException
-
engineInit
protected void engineInit(byte[] params, java.lang.String decodingMethod) throws java.io.IOExceptionInitialize the DSAParameters by encoded bytes with the specified decoding method.- Specified by:
engineInitin classjava.security.AlgorithmParametersSpi- Parameters:
params- the encoded bytes of the parameters.decodingMethod- the decoding method to be used.- Throws:
FIPSRuntimeException- if SelfTest.isFipsRunnable returns false.java.io.IOException
-
internalInit
protected void internalInit(byte[] params, java.lang.String decodingMethod) throws java.io.IOExceptionInitialize the DSAParameters by encoded bytes with the specified decoding method.- Parameters:
params- the encoded bytes of the parameters.decodingMethod- the decoding method to be used.- Throws:
java.io.IOException
-
engineGetParameterSpec
protected java.security.spec.AlgorithmParameterSpec engineGetParameterSpec(java.lang.Class paramSpec) throws java.security.spec.InvalidParameterSpecExceptionReturn the parameter spec used by this parameter instance.- Specified by:
engineGetParameterSpecin classjava.security.AlgorithmParametersSpi- Parameters:
paramSpec- the parameter spec class to be returned- Returns:
- AlgorithmParameterSpec the newly generated parameterSpec
- Throws:
FIPSRuntimeException- if SelfTest.isFipsRunnable returns false.java.security.spec.InvalidParameterSpecException
-
internalGetParameterSpec
protected java.security.spec.AlgorithmParameterSpec internalGetParameterSpec(java.lang.Class paramSpec) throws java.security.spec.InvalidParameterSpecExceptionReturn the parameter spec used by this parameter instance.- Parameters:
paramSpec- the parameter spec class to be returned- Returns:
- AlgorithmParameterSpec the newly generated parameterSpec
- Throws:
java.security.spec.InvalidParameterSpecException
-
engineGetEncoded
protected byte[] engineGetEncoded() throws java.io.IOExceptionReturns the parameters in encoded bytes.- Specified by:
engineGetEncodedin classjava.security.AlgorithmParametersSpi- Returns:
- byte[] the encoded parameters
- Throws:
FIPSRuntimeException- if SelfTest.isFipsRunnable returns false.java.io.IOException
-
internalGetEncoded
protected byte[] internalGetEncoded() throws java.io.IOExceptionReturns the parameters in encoded bytes.- Returns:
- byte[] the encoded parameters
- Throws:
java.io.IOException
-
engineGetEncoded
protected byte[] engineGetEncoded(java.lang.String encodingMethod) throws java.io.IOExceptionReturns the parameters in encoded bytes with encoding method specified.- Specified by:
engineGetEncodedin classjava.security.AlgorithmParametersSpi- Returns:
- byte[] encoded parameters.
- Throws:
FIPSRuntimeException- if SelfTest.isFipsRunnable returns false.java.io.IOException
-
internalGetEncoded
protected byte[] internalGetEncoded(java.lang.String encodingMethod) throws java.io.IOExceptionReturns the parameters in encoded bytes with encoding method specified.- Returns:
- byte[] encoded parameters.
- Throws:
FIPSRuntimeException- if SelfTest.isFipsRunnable returns false.java.io.IOException
-
engineToString
protected java.lang.String engineToString()
- Specified by:
engineToStringin classjava.security.AlgorithmParametersSpi
-
internalToString
protected java.lang.String internalToString()
-
-