Class X509PublicKey

java.lang.Object
org.apache.harmony.security.x509.X509PublicKey
All Implemented Interfaces:
Serializable, Key, PublicKey

public final class X509PublicKey
extends Object
implements PublicKey
See Also:
Serialized Form
  • Constructor Details

    • X509PublicKey

      public X509PublicKey​(String algorithm, byte[] encoded, byte[] keyBytes)
  • 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.
    • toString

      public String toString()
      Description copied from class: Object
      Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
         getClass().getName() + '@' + Integer.toHexString(hashCode())

      See Writing a useful toString method if you intend implementing your own toString method.

      Overrides:
      toString in class Object
      Returns:
      a printable representation of this object.