public enum Ed25519CryptoFunction extends java.lang.Enum<Ed25519CryptoFunction> implements CryptoFunction
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
KeyPair |
generateKeyPair()
Generates a private key and a corresponding public key using a random seed.
|
KeyPair |
generateKeyPair(byte[] seed)
Generates a private key and a corresponding public key using a
seed byte array. |
byte[] |
signMessage(byte[] message,
PrivateKey privateKey)
Given a
privateKey, computes and returns a signature for the supplied message. |
static Ed25519CryptoFunction |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Ed25519CryptoFunction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
boolean |
verify(byte[] message,
byte[] signature,
PublicKey publicKey)
Given a
publicKey, verifies that signature is a valid signature for the
supplied message. |
public static final Ed25519CryptoFunction INSTANCE
public static Ed25519CryptoFunction[] values()
for (Ed25519CryptoFunction c : Ed25519CryptoFunction.values()) System.out.println(c);
public static Ed25519CryptoFunction valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic KeyPair generateKeyPair(byte[] seed)
CryptoFunctionseed byte array.generateKeyPair in interface CryptoFunctionpublic KeyPair generateKeyPair()
CryptoFunctiongenerateKeyPair in interface CryptoFunctionpublic byte[] signMessage(byte[] message,
PrivateKey privateKey)
CryptoFunctionprivateKey, computes and returns a signature for the supplied message.signMessage in interface CryptoFunctionpublic boolean verify(byte[] message,
byte[] signature,
PublicKey publicKey)
CryptoFunctionpublicKey, verifies that signature is a valid signature for the
supplied message.verify in interface CryptoFunctionCopyright © 2018 Exonum. All rights reserved.