Package org.symbol.sdk.symbol
Class KeyPair
java.lang.Object
org.symbol.sdk.symbol.KeyPair
- All Implemented Interfaces:
KeyPair
- KeyPair
- Represents an Ed25519 private and public key for the Symbol network; uses the SHA-512 hash mode.
-
Constructor Summary
ConstructorsConstructorDescriptionKeyPair(CryptoTypes.PrivateKey privateKey) Creates a key pair from a private key. -
Method Summary
Modifier and TypeMethodDescriptionGets the private key.Gets the public key.sign(byte[] message) Signs a message with the private key.
-
Constructor Details
-
KeyPair
Creates a key pair from a private key.- Parameters:
privateKey- Private key.
-
-
Method Details
-
getPublicKey
- KeyPair.publicKey
- Gets the public key.
- Specified by:
getPublicKeyin interfaceKeyPair- Returns:
- Public key.
-
getPrivateKey
- KeyPair.getPrivateKey
- Gets the private key.
- Specified by:
getPrivateKeyin interfaceKeyPair- Returns:
- Private key.
-
sign
- KeyPair.sign
- Signs a message with the private key.
-