Class EDDSAPublicKey

  • All Implemented Interfaces:
    JSONable

    public class EDDSAPublicKey
    extends PublicKey
    Edwards Curve Digital Signature Algorithm (EDDSA) Public Key
    Version:
    July 23, 2021
    Author:
    Sergey Manoylo
    • Constructor Detail

      • EDDSAPublicKey

        public EDDSAPublicKey​(SignatureAlgorithm signatureAlgorithm,
                              byte[] xEncoded)
        Constructor
        Parameters:
        signatureAlgorithm -
        publicKeyData -
      • EDDSAPublicKey

        public EDDSAPublicKey​(EDDSAPublicKey eddsaPublicKey)
        Copy Constructor
        Parameters:
        eddsaPublicKey -
    • Method Detail

      • getPublicKeySpec

        public X509EncodedKeySpec getPublicKeySpec()
        get public key value array (X509 encoded) in X509EncodedKeySpec object; X509EncodedKeySpec allows to get encoded array (byte[] getEncoded())
        Returns:
        public key value array (X509 encoded) in X509EncodedKeySpec object; X509EncodedKeySpec allows to get encoded array (byte[] getEncoded());
      • getPublicKeyDecoded

        public byte[] getPublicKeyDecoded()
        Returns original array (decoded) of the public key (ED25519 - 32 byte, ED448 - 56 bytes)
        Returns:
        original array (decoded) of the public key;
      • getPublicKeyEncoded

        public byte[] getPublicKeyEncoded()
        Returns encoded public key
        Returns:
      • toJSONObject

        public org.json.JSONObject toJSONObject()
                                         throws org.json.JSONException
        Converts EDDSA public key to JSON Object
        Throws:
        org.json.JSONException
      • toString

        public String toString()
        Converts EDDSA public key to String Object
        Overrides:
        toString in class Object