deriveKey
deriveKey(
instance
,options
):Promise
<CryptoKey
>
Defined in: astrobase/src/encrypt/encrypt.ts:102
Derives a symmetric encryption key using the given options. Requires a key derivation input to be
provided - one of EncryptOptions.passphrase or EncryptOptions.pubKey. If pubkey
is provided, then the Identity’s private key must be available in the Keyring.
The promise will error if no key derivation input is provided or if key derivation fails.
Parameters
Section titled “Parameters”instance
Section titled “instance”The instance of the active Keyring when using pubKey
.
options
Section titled “options”The full options to be used.
Returns
Section titled “Returns”Promise
<CryptoKey
>
The derived crypto key as a promise.