Package org.drasyl.identity
Class KeyAgreementPublicKey
- java.lang.Object
-
- org.drasyl.identity.KeyAgreementPublicKey
-
-
Field Summary
Fields Modifier and Type Field Description static short
KEY_LENGTH_AS_BYTES
static short
KEY_LENGTH_AS_STRING
-
Constructor Summary
Constructors Constructor Description KeyAgreementPublicKey()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyAgreementPublicKey
intern()
static KeyAgreementPublicKey
of(byte[] bytes)
Converts a byte[] into aKeyAgreementPublicKey
.static KeyAgreementPublicKey
of(String bytes)
Converts aString
into aKeyAgreementPublicKey
.static KeyAgreementPublicKey
of(ImmutableByteArray bytes)
byte[]
toByteArray()
String
toString()
-
-
-
Field Detail
-
KEY_LENGTH_AS_BYTES
public static final short KEY_LENGTH_AS_BYTES
- See Also:
- Constant Field Values
-
KEY_LENGTH_AS_STRING
public static final short KEY_LENGTH_AS_STRING
- See Also:
- Constant Field Values
-
-
Method Detail
-
intern
public KeyAgreementPublicKey intern()
-
toByteArray
public byte[] toByteArray()
- Specified by:
toByteArray
in interfaceKey
-
of
public static KeyAgreementPublicKey of(ImmutableByteArray bytes)
-
of
public static KeyAgreementPublicKey of(byte[] bytes)
Converts a byte[] into aKeyAgreementPublicKey
.- Parameters:
bytes
- public key- Returns:
KeyAgreementPublicKey
- Throws:
NullPointerException
- ifkey
isnull
-
of
public static KeyAgreementPublicKey of(String bytes)
Converts aString
into aKeyAgreementPublicKey
.- Parameters:
bytes
- keyAsHexString as String- Returns:
KeyAgreementPublicKey
- Throws:
NullPointerException
- ifkeyAsHexString
isnull
IllegalArgumentException
- ifkeyAsHexString
does not conform to a valid keyAsHexString string
-
-