UNPKG

@lexamica-modules/job-queue

Version:

The package for the Lexamica Job Queue SDK powered by Redis and BullMQ

17 lines (16 loc) 821 B
/** * Encrypt the data payload and return an object with the encrypted data. * @param {Record<string, unknown>} payload An object of data to encrypt * @returns {{ encrypted: string } | void} Returns an object with an encrypted key containing the encrypted data as a string */ export declare function encryptPayload(payload: Record<string, unknown>): { encrypted: string; } | void; /** * Decrypt a data string and parse into an object. This should only be used with data encrypted using the encryptPayload function * @param {{ encrypted: string }} encryptedData an object with a key called encrypted with an encryted stringified payload to decrypt * @returns {Record<string, unknown> | void} */ export declare function decryptPayload(encryptedData: { encrypted: string; }): Record<string, unknown> | void;