public interface CryptoFunction
NullPointerException will be thrown.| 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. |
boolean |
verify(byte[] message,
byte[] signature,
PublicKey publicKey)
Given a
publicKey, verifies that signature is a valid signature for the
supplied message. |
KeyPair generateKeyPair(byte[] seed)
seed byte array.java.lang.IllegalArgumentException - if the specified seed is not validKeyPair generateKeyPair()
byte[] signMessage(byte[] message,
PrivateKey privateKey)
privateKey, computes and returns a signature for the supplied message.java.lang.IllegalArgumentException - if the private key is not valid for this cryptographic
functionboolean verify(byte[] message,
byte[] signature,
PublicKey publicKey)
publicKey, verifies that signature is a valid signature for the
supplied message.Copyright © 2018 Exonum. All rights reserved.