Class DSAPrivateKeyImpl

java.lang.Object
org.apache.harmony.security.PrivateKeyImpl
org.apache.harmony.security.provider.crypto.DSAPrivateKeyImpl
All Implemented Interfaces:
Serializable, DSAKey, DSAPrivateKey, Key, PrivateKey

public class DSAPrivateKeyImpl
extends PrivateKeyImpl
implements DSAPrivateKey
The class provides DSAPrivateKey functionality by extending a class implementing PrivateKey and implementing methods defined in both interfaces, DSAKey and DSAPrivateKey
See Also:
Serialized Form
  • Constructor Details

    • DSAPrivateKeyImpl

      public DSAPrivateKeyImpl​(DSAPrivateKeySpec keySpec)
      Creates object from DSAPrivateKeySpec.
      Parameters:
      keySpec - - a DSAPrivateKeySpec object
    • DSAPrivateKeyImpl

      public DSAPrivateKeyImpl​(PKCS8EncodedKeySpec keySpec) throws InvalidKeySpecException
      Creates object from PKCS8EncodedKeySpec.
      Parameters:
      keySpec - - a XPKCS8EncodedKeySpec object
      Throws:
      InvalidKeySpecException - - if key data cannot be obtain from encoded format
  • Method Details

    • getX

      public BigInteger getX()
      Description copied from interface: DSAPrivateKey
      Returns the private key value x.
      Specified by:
      getX in interface DSAPrivateKey
      Returns:
      the private key value x.
    • getParams

      public DSAParams getParams()
      Description copied from interface: DSAKey
      Returns the DSA key parameters.
      Specified by:
      getParams in interface DSAKey
      Returns:
      the DSA key parameters.