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
.This is an immutable object.
-
-
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(byte[] publicKey, byte[] privateKey)
static CompressedKeyPair
of(String publicKey, String 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:
IllegalStateException
- if uncompressed public or private keys could not be generated
-
of
public static CompressedKeyPair of(CompressedPublicKey publicKey, CompressedPrivateKey privateKey)
-
of
public static CompressedKeyPair of(String publicKey, String privateKey)
-
of
public static CompressedKeyPair of(byte[] publicKey, byte[] privateKey)
-
-