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