Interface EncryptContentOptions

Specify encryption options, and whether to sign the ciphertext.



cipherTextEncoding?: CipherTextEncoding

String encoding format for the cipherText bytes. Currently defaults to 'hex' for legacy backwards-compatibility. Only used if the encrypt option is also used. Note: in the future this should default to 'base64' for the significant file size reduction.

privateKey?: string

Encrypt the data with the public key corresponding to the supplied private key

publicKey?: string

Encrypt the data with this key.

sign?: string | boolean

If set to true the data is signed using ECDSA on SHA256 hashes with the user's app private key. If a string is specified, it is used as the private key instead of the user's app private key.


wasString?: boolean

Specifies if the original unencrypted content is a ASCII or UTF-8 string. For example stringified JSON. If true, then when the ciphertext is decrypted, it will be returned as a string type variable, otherwise will be returned as bytes.

Generated using TypeDoc