Class Ed25519PrivateKey

    • Constructor Detail

      • Ed25519PrivateKey

        public Ed25519PrivateKey​(byte[] privateKey)
      • Ed25519PrivateKey

        public Ed25519PrivateKey()
    • Method Detail

      • loadPrivateKey

        public void loadPrivateKey​(byte[] privateKey)
        Description copied from class: AbstractPrivateKey
        Loads a private key from a byte array
        Specified by:
        loadPrivateKey in class AbstractPrivateKey
        Parameters:
        privateKey - the private key bytes
      • readPrivateKey

        public void readPrivateKey​(java.io.Reader reader)
                            throws java.io.IOException
        Description copied from class: AbstractPrivateKey
        Reads the private key from a stream
        Specified by:
        readPrivateKey in class AbstractPrivateKey
        Parameters:
        reader - the source of the private key
        Throws:
        java.io.IOException - thrown if an error occurs reading the file
      • writePrivateKey

        public void writePrivateKey​(java.io.Writer writer)
                             throws java.io.IOException
        Description copied from class: AbstractPrivateKey
        Writes the private key to a file
        Specified by:
        writePrivateKey in class AbstractPrivateKey
        Parameters:
        writer - the target writer
        Throws:
        java.io.IOException - thrown if an error occurs writing the file
      • sign

        public byte[] sign​(byte[] message)
        Description copied from class: AbstractPrivateKey
        Signs a message with the loaded key
        Specified by:
        sign in class AbstractPrivateKey
        Parameters:
        message - message to sign
        Returns:
        signed message
      • deriveFromSeed

        public static Ed25519PrivateKey deriveFromSeed​(byte[] seed,
                                                       int[] path)
                                                throws java.io.IOException
        Throws:
        java.io.IOException