public class PrivateKey extends AbstractKey
key| Constructor and Description |
|---|
PrivateKey(byte[] privateKey)
PrivateKey constructor with byte[].
|
PrivateKey(String privateKeyBase64)
PrivateKey constructor with base64 String.
|
| Modifier and Type | Method and Description |
|---|---|
PublicKey |
getPublicKey() |
byte[] |
sign(byte[] message)
accepts a message and returns its corresponding Ed25519 signature.
|
getKeypublic PrivateKey(byte[] privateKey)
privateKey - public PrivateKey(String privateKeyBase64)
privateKeyBase64 - public PublicKey getPublicKey()
public byte[] sign(byte[] message)
throws NoSuchAlgorithmException,
InvalidKeyException,
SignatureException
message - NoSuchAlgorithmExceptionInvalidKeyExceptionSignatureExceptionCopyright © 2020 Transchain. All rights reserved.