Enum Ed25519CryptoFunction

    • Method Detail

      • values

        public static Ed25519CryptoFunction[] values()
        Returns an array containing the constants of this enum type, in the order they are declared.
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Ed25519CryptoFunction valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • generateKeyPair

        public KeyPair generateKeyPair​(byte[] seed)
        Description copied from interface: CryptoFunction
        Generates a private key and a corresponding public key using a seed byte array.
        Specified by:
        generateKeyPair in interface CryptoFunction
      • signMessage

        public byte[] signMessage​(byte[] message,
                                  PrivateKey privateKey)
        Description copied from interface: CryptoFunction
        Given a privateKey, computes and returns a signature for the supplied message.
        Specified by:
        signMessage in interface CryptoFunction
        Returns:
        signature as a byte array
      • verify

        public boolean verify​(byte[] message,
                              byte[] signature,
                              PublicKey publicKey)
        Description copied from interface: CryptoFunction
        Given a publicKey, verifies that signature is a valid signature for the supplied message.
        Specified by:
        verify in interface CryptoFunction
        Returns:
        true if signature is valid, false otherwise