Class PrivateKey
- java.lang.Object
-
- com.github.katenachain.crypto.AbstractKey
-
- com.github.katenachain.crypto.ED25519.PrivateKey
-
public class PrivateKey extends AbstractKey
PrivateKey is an Ed25519 private key wrapper (64 bytes).
-
-
Field Summary
-
Fields inherited from class com.github.katenachain.crypto.AbstractKey
key
-
-
Constructor Summary
Constructors Constructor Description PrivateKey(byte[] privateKey)PrivateKey constructor with byte[].PrivateKey(String privateKeyBase64)PrivateKey constructor with base64 String.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PublicKeygetPublicKey()byte[]sign(byte[] message)accepts a message and returns its corresponding Ed25519 signature.-
Methods inherited from class com.github.katenachain.crypto.AbstractKey
getKey
-
-
-
-
Constructor Detail
-
PrivateKey
public PrivateKey(byte[] privateKey)
PrivateKey constructor with byte[].
-
PrivateKey
public PrivateKey(String privateKeyBase64)
PrivateKey constructor with base64 String.
-
-
Method Detail
-
getPublicKey
public PublicKey getPublicKey()
-
sign
public byte[] sign(byte[] message) throws NoSuchAlgorithmException, InvalidKeyException, SignatureExceptionaccepts a message and returns its corresponding Ed25519 signature.
-
-