Package ch.threema.apitool.types
Class Key
java.lang.Object
ch.threema.apitool.types.Key
Encapsulates an asymmetric key, either public or private.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
separator
- See Also:
-
key
public byte[] key -
type
-
-
Constructor Details
-
Key
-
-
Method Details
-
decodeKey
Decodes and validates an encoded key. Encoded key format: type:hex_key- Parameters:
encodedKey- an encoded key- Throws:
InvalidKeyException
-
decodeKey
Decodes and validates an encoded key. Encoded key format: type:hex_key- Parameters:
encodedKey- an encoded keyexpectedKeyType- the expected type of the key- Throws:
InvalidKeyException
-
encode
Encodes a key.- Returns:
- an encoded key
-