Class PrivateKeyImpl

java.lang.Object
org.apache.harmony.security.PrivateKeyImpl
All Implemented Interfaces:
Serializable, Key, PrivateKey
Direct Known Subclasses:
DSAPrivateKeyImpl

public class PrivateKeyImpl
extends Object
implements PrivateKey
PrivateKeyImpl
See Also:
Serialized Form
  • Constructor Details

    • PrivateKeyImpl

      public PrivateKeyImpl​(String algorithm)
  • Method Details

    • getAlgorithm

      public String getAlgorithm()
      Description copied from interface: Key
      Returns the name of the algorithm of this key. If the algorithm is unknown, null is returned.
      Specified by:
      getAlgorithm in interface Key
      Returns:
      the name of the algorithm of this key or null if the algorithm is unknown.
    • getFormat

      public String getFormat()
      Description copied from interface: Key
      Returns the name of the format used to encode this key, or null if it can not be encoded.
      Specified by:
      getFormat in interface Key
      Returns:
      the name of the format used to encode this key, or null if it can not be encoded.
    • getEncoded

      public byte[] getEncoded()
      Description copied from interface: Key
      Returns the encoded form of this key, or null if encoding is not supported by this key.
      Specified by:
      getEncoded in interface Key
      Returns:
      the encoded form of this key, or null if encoding is not supported by this key.
    • setAlgorithm

      public void setAlgorithm​(String algorithm)
    • setEncoding

      public void setEncoding​(byte[] encoding)