The raw encryption key as a byte string.
Used to decrypt generated bytes such as encryption keys or verification keys. N.B.. Encryption keys are considered binary data even though they are often represented as strings
Used to decrypt user-entered data such as birthdays or name. Should not be used to decrypt keys - use decryptKey instead.
Accepts string or null for compatibility with API return types, and returns null only when input is null.
Used to encrypt generated bytes such as encryption keys or verification keys. N.B.. Encryption keys are considered binary data even though they are often represented as strings.
Base 64 encoded encrypted string.
Used to encrypt user-entered data such as birthdays or name. Should not be used to encrypt keys - use encryptKey instead. Empty string input will produce a null result.
Base 64 encoded encrypted string.
Implicitly called by JSON.stringify()
to ensure that the value is safely printable
Create a SymmetricKey from encoded URL-safe base 64 version of the key. Use this for keys received via API calls or printed from the CLI.
A new, random symmetric key with default length.
Generated using TypeDoc
Meeco password-derived, key-encryption and data-encryption keys are all symmetric keys (there is one key that is used to both encrypt and decrypt things).
This wrapper ensures that keys can be safely serialized as JSON (by encoding them as URL-Safe Base64) and avoids confusion when dealing with converting to and from this encoded format, as well as encrypting UTF-8 strings or other keys.