Package org.symbol.sdk
Interface KeyPair
- All Known Implementing Classes:
KeyPair
public interface KeyPair
- KeyPair
- Cross-blockchain key-pair contract implemented by the Symbol and NEM key pairs (which differ only in the Ed25519 hash mode and private-key byte order). Each key pair signs with its own chain's algorithm.
-
Method Summary
Modifier and TypeMethodDescriptionGets the private key.Gets the public key.sign(byte[] message) Signs a message with the private key.
-
Method Details
-
getPublicKey
CryptoTypes.PublicKey getPublicKey()- KeyPair.publicKey
- Gets the public key.
- Returns:
- Public key.
-
getPrivateKey
CryptoTypes.PrivateKey getPrivateKey()- KeyPair.getPrivateKey
- Gets the private key.
- Returns:
- Private key.
-
sign
- KeyPair.sign
- Signs a message with the private key.
- Parameters:
message- Message to sign.- Returns:
- Message signature.
-