encryptionKey
This setting was added in Profound.js / Profound API version 7
Specifies the encryption key used for built-in encryption features. The key must be specified as a Node.js Buffer object of 32 bytes.
Examples
Load Key from a File
To load the key from a file created by gen_key.js, add these lines to the top of your configuration file, if not already present:
const fs = require("fs");
const path = require("path");
And then populate the setting like this:
"encryptionKey": fs.readFileSync(path.join(__dirname, "ekey"))
Load Key from Other Sources
The encryption key can be loaded from other sources using custom JavaScript code in the configuration file. For example, code like this could be used to populate the key from a Base64-encoded environment variable named ENCRYPTION_KEY:
"encryptionKey": Buffer.from(process.env.ENCRYPTION_KEY, "base64")
Click here for information on how to modify this setting.
Some documentation pages have recently moved to a new section: Profound AppDev. If you are having trouble finding specific pages, try the documentation search capability or reach out to our Support team!