K
- the key typepublic abstract class KeyEncoder<K>
extends java.lang.Object
KeyEncoder
is used to transform a K
key into an array of 32 bytes.Constructor and Description |
---|
KeyEncoder()
Construct a
KeyEncoder . |
Modifier and Type | Method and Description |
---|---|
abstract KeyEncodingResult |
encode(K key)
Encodes a
K key into an array of 32-bytes. |
abstract K |
fromBytes(byte[] keyAsBytes)
Retrieves a encoded key.
|
public KeyEncoder()
KeyEncoder
.public abstract K fromBytes(byte[] keyAsBytes)
keyAsBytes
- the 32 byte encoded keyK
keypublic abstract KeyEncodingResult encode(K key)
K
key into an array of 32-bytes.key
- the K
keyKeyEncodingResult