public static interface KeyDerivation.Native
| Modifier and Type | Method and Description |
|---|---|
int |
cryptoKdfDeriveFromKey(byte[] subKey,
int subKeyLen,
long subKeyId,
byte[] context,
byte[] masterKey)
Derive a subkey from a master key.
|
void |
cryptoKdfKeygen(byte[] masterKey)
Creates a master key.
|
void cryptoKdfKeygen(byte[] masterKey)
masterKey - The byte array to populate. Should be
KeyDerivation.MASTER_KEY_BYTES.int cryptoKdfDeriveFromKey(byte[] subKey,
int subKeyLen,
long subKeyId,
byte[] context,
byte[] masterKey)
subKey - The subkey.subKeyLen - The length of the subkey. Should be
from KeyDerivation.BYTES_MIN to KeyDerivation.BYTES_MAX.subKeyId - ID of subkey.context - The context of the subkey. Must be KeyDerivation.CONTEXT_BYTES.masterKey - The generated master key from cryptoKdfKeygen(byte[]). Must be KeyDerivation.MASTER_KEY_BYTES.