Package com.exonum.binding.common.crypto
Class KeyPair
java.lang.Object
com.exonum.binding.common.crypto.KeyPair
public class KeyPair
extends java.lang.Object
A key pair class that stores public and private keys.
-
Method Summary
Modifier and Type Method Description PrivateKeygetPrivateKey()Returns a private key of this pair.PublicKeygetPublicKey()Returns a public key of this pair.static KeyPairnewInstance(byte[] privateKey, byte[] publicKey)Creates aKeyPairfrom two byte arrays, representingprivateKeyandpublicKey.static KeyPairnewInstance(PrivateKey privateKey, PublicKey publicKey)Creates a new KeyPair from the given key pairs.
-
Method Details
-
newInstance
Creates a new KeyPair from the given key pairs. -
newInstance
Creates aKeyPairfrom two byte arrays, representingprivateKeyandpublicKey. All arrays are defensively copied. -
getPrivateKey
Returns a private key of this pair. -
getPublicKey
Returns a public key of this pair.
-