Package org.drasyl.identity
Class KeyPair<P extends PublicKey,S extends SecretKey>
java.lang.Object
org.drasyl.identity.KeyPair<P,S>
This class is a simple holder for a key pair (a
IdentityPublicKey
and a IdentitySecretKey
). It does not enforce any security, and, when initialized, should be treated
like a IdentitySecretKey
.
This is an immutable object.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract P
abstract S
of
(P publicKey, S secretKey) UnlikeObject.toString()
, this method returns the key pair with the unmasked secret key.
-
Constructor Details
-
KeyPair
public KeyPair()
-
-
Method Details
-
getPublicKey
-
getSecretKey
-
toUnmaskedString
UnlikeObject.toString()
, this method returns the key pair with the unmasked secret key.- Returns:
- key pair with unmasked secret key
-
of
- Throws:
NullPointerException
- ifpubliceKey
orsecretKey
isnull
.
-