pjs.decrypt()
This API was added in Profound.js / Profound API version 7
This API can be used to decrypt data encrypted with pjs.encrypt().
Parameters
Data (Buffer). Data to decrypt. Must be a Node.js Buffer object.
Encryption key (Buffer/optional). If passed, must be a Buffer of 32 bytes. If not passed, the key specified by the encryptionKey configuration setting is used.
Return Value
A Buffer object containing the decrypted data.
Examples
const data = Buffer.from("Top Secret");
const encrypted = pjs.encrypt(data);
const decrypted = pjs.decrypt(encrypted);
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!