A proof of concept for Encrypting and Decrypting files using OpenPGP in Netsuite with the OpenPGP.js library. It works ok for files around 1mb. One 2mb pdf that I tried failed. There can absolutely be issues with encoding. I have tested it to work with UTF-8 encoded text-files.
Beware, there are many flaws in the design.
- No restart of processing M/R script if more queue records are created while it is still processing the first batch
- Keys are stored in plain-text (maybe they could be encrypted using NS-encryption functions and a key stored in the API Secrets that is bundled.
- ...more
A list of different types of encryption, the idea was to be able to expand with other forms of encryptions.
In these records you setup rules for handling files in the file cabinet. What type of encryption and keys for it
This record will keep track of the en-/decryption tasks that are pending
Monitors the input folders according to the "WTZ File Crypto Job Setup"-records and creates queue-records for files in the folders.
On afterSubmit it will try to submit a Map/reduce task if the record has the status "Pending"
This will process all queue-records that has the status "Pending"