public class Key extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Key.KeyType |
Modifier and Type | Field and Description |
---|---|
byte[] |
key |
static String |
separator |
String |
type |
Modifier and Type | Method and Description |
---|---|
static Key |
decodeKey(String encodedKey)
Decodes and validates an encoded key.
|
static Key |
decodeKey(String encodedKey,
String expectedKeyType)
Decodes and validates an encoded key.
|
String |
encode()
Encodes a key.
|
public static final String separator
public byte[] key
public String type
public Key(String type, byte[] key)
public static Key decodeKey(String encodedKey) throws InvalidKeyException
encodedKey
- an encoded keyInvalidKeyException
public static Key decodeKey(String encodedKey, String expectedKeyType) throws InvalidKeyException
encodedKey
- an encoded keyexpectedKeyType
- the expected type of the keyInvalidKeyException
public String encode()
Copyright © 2015 Threema GmbH, Staldenbachstrasse 11, 8808 Pfäffikon SZ, Schweiz. All rights reserved.