com.ibm.crypto.fips.provider
Class DSAPublicKey
- java.lang.Object
-
- com.ibm.security.x509.X509Key
-
- com.ibm.crypto.fips.provider.DSAPublicKey
-
- All Implemented Interfaces:
- java.io.Serializable, java.security.interfaces.DSAKey, java.security.interfaces.DSAPublicKey, java.security.Key, java.security.PublicKey
public final class DSAPublicKey extends com.ibm.security.x509.X509Key implements java.security.interfaces.DSAPublicKey, java.io.SerializableThis class represents an X.509 public key for the DSA Algorithm.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description DSAPublicKey(java.math.BigInteger y, java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g)Create a new DSA public key from y, p, q, and g.DSAPublicKey(byte[] encoded)Make a DSA public key from its DER encoding (X.509).
-
Method Summary
Methods Modifier and Type Method and Description protected voidfinalize()This function zeroizes the key so that it isn't in memory when GC is done.java.security.interfaces.DSAParamsgetParams()Return the DSA parameters for the receiver.java.math.BigIntegergetY()Return the value of the public key.protected voidparseKeyBits()java.lang.StringtoString()voidzeroize()This function zeroizes the key so that it isn't in memory
-
-
-
Constructor Detail
-
DSAPublicKey
public DSAPublicKey(java.math.BigInteger y, java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g) throws java.security.InvalidKeyExceptionCreate a new DSA public key from y, p, q, and g.- Parameters:
y- public keyp- prime modulusq- prime divisorg- the number g- Throws:
java.security.InvalidKeyException
-
DSAPublicKey
public DSAPublicKey(byte[] encoded) throws java.security.InvalidKeyExceptionMake a DSA public key from its DER encoding (X.509).- Parameters:
encoded- the encoded bytes of the public key- Throws:
java.security.InvalidKeyException
-
-
Method Detail
-
getY
public java.math.BigInteger getY()
Return the value of the public key.- Specified by:
getYin interfacejava.security.interfaces.DSAPublicKey- Parameters:
the- value of y
-
getParams
public java.security.interfaces.DSAParams getParams()
Return the DSA parameters for the receiver.- Specified by:
getParamsin interfacejava.security.interfaces.DSAKey- Returns:
- DSAParams the DSA parameters of this instance
-
parseKeyBits
protected void parseKeyBits() throws java.security.InvalidKeyException- Overrides:
parseKeyBitsin classcom.ibm.security.x509.X509Key- Throws:
java.security.InvalidKeyException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classcom.ibm.security.x509.X509Key
-
zeroize
public void zeroize()
This function zeroizes the key so that it isn't in memory
-
finalize
protected void finalize()
This function zeroizes the key so that it isn't in memory when GC is done.- Overrides:
finalizein classjava.lang.Object
-
-