Package org.drasyl.identity
Class CompressedKeyPair
- java.lang.Object
-
- org.drasyl.identity.CompressedKeyPair
-
public class CompressedKeyPair extends Object
This class is a simple holder for a compressed key pair (aCompressedPublicKey
and aCompressedPrivateKey
). It does not enforce any security, and, when initialized, should be treated like aCompressedPrivateKey
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
CompressedPrivateKey
getPrivateKey()
CompressedPublicKey
getPublicKey()
int
hashCode()
static CompressedKeyPair
of(String publicKey, String privateKey)
static CompressedKeyPair
of(KeyPair keyPair)
static CompressedKeyPair
of(PublicKey publicKey, PrivateKey privateKey)
static CompressedKeyPair
of(CompressedPublicKey publicKey, CompressedPrivateKey privateKey)
String
toString()
KeyPair
toUncompressedKeyPair()
-
-
-
Method Detail
-
getPublicKey
public CompressedPublicKey getPublicKey()
-
getPrivateKey
public CompressedPrivateKey getPrivateKey()
-
toUncompressedKeyPair
public KeyPair toUncompressedKeyPair() throws CryptoException
- Throws:
CryptoException
-
of
public static CompressedKeyPair of(CompressedPublicKey publicKey, CompressedPrivateKey privateKey)
-
of
public static CompressedKeyPair of(String publicKey, String privateKey) throws CryptoException
- Throws:
CryptoException
-
of
public static CompressedKeyPair of(KeyPair keyPair) throws CryptoException
- Throws:
CryptoException
-
of
public static CompressedKeyPair of(PublicKey publicKey, PrivateKey privateKey) throws CryptoException
- Throws:
CryptoException
-
-