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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static KeyPair
createKeyPair(byte[] privateKey, byte[] publicKey)
Creates aKeyPair
from two byte arrays, representingprivateKey
andpublicKey
.PrivateKey
getPrivateKey()
Returns a private key of this pair.PublicKey
getPublicKey()
Returns a public key of this pair.
-
-
-
Method Detail
-
createKeyPair
public static KeyPair createKeyPair(byte[] privateKey, byte[] publicKey)
Creates aKeyPair
from two byte arrays, representingprivateKey
andpublicKey
. 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.
-
-