public interface KeyPairBuilder
| Modifier and Type | Method and Description |
|---|---|
java.security.PublicKey |
createPublicKey(byte[] publicKey)
Creates a public key from the provided raw bytes
|
java.security.KeyPair |
generateKeyPair(byte[] seed)
Generates a new key pair
|
Algorithm |
getAlgorithm()
The algorithm of the signer
|
byte[] |
getPublicKeyRawBytes(java.security.PublicKey publicKey)
Obtains the raw bytes from a public key so can be used in casper types
|
boolean |
isSupportedPublicKey(java.security.PublicKey publicKey)
Indicates if the provided public key has an algorithm that is supported by this signer
|
byte[] |
signWithPrivateKey(java.security.PrivateKey privateKey,
byte[] message)
Signs a message using the provided key
|
boolean |
verifySignature(java.security.PublicKey publicKey,
byte[] message,
byte[] signature)
Verifies a signed message
|
java.security.KeyPair generateKeyPair(@Nullable
byte[] seed)
seed - the optional entropy source to be used when generating a key pairAlgorithm getAlgorithm()
boolean isSupportedPublicKey(java.security.PublicKey publicKey)
publicKey - the public key to testbyte[] getPublicKeyRawBytes(java.security.PublicKey publicKey)
publicKey - the public key to obtain the raw bytes fromjava.security.PublicKey createPublicKey(byte[] publicKey)
publicKey - the public key raw bytesbyte[] signWithPrivateKey(java.security.PrivateKey privateKey,
byte[] message)
privateKey - the private key to sign withmessage - the message to signboolean verifySignature(java.security.PublicKey publicKey,
byte[] message,
byte[] signature)
publicKey - the public key to verify signature withmessage - the message to signsignature - the signed message