***Please note that applying the Encryption flag to an element will drop existing data for that form and recreate it in the database. Don't apply this property to a live form unless you don't need the data***
Sensitive information such as Personal Health Information can be concealed in the data views and feeds. Data encryption takes place right before the record is sent back to the server, and remains encrypted until decryption requirements are met (see below).
This feature can be applied to any project that requires specific fields to remain encrypted from a third party view, unless authorization has been provided. Only those users with the private decryption key will be able to view the sensitive data.
Users are responsible for generating their own public and private keys. Please do not contact us asking for the encryption keys. You must create these keys locally on your machine.
The public encryption key needs to be pasted in the Data Security section on the Company Info page. Paste your key exactly as show in the image to the right. Anytime a new Public key is generated, users must sync their device to ensure they are collecting data with the same key.
*WE DO NOT SAVE THE PRIVATE KEY*
We STRONGLY recommend that you decrypt your data after it has been downloaded from iFormBuilder application (see example below).
Should you choose to decrypt the data within iFormBuilder the private key will be required for each session. Click on the list view icon from the main data view page to access the decryption icon. Select the decryption icon to enter your private key to decrypt your data.
Click the link below to see how you can create your own set of keys for OSX.
Decrypt XML data locally using this example PHP script in OSX.
1. Create a folder (decryptData) on your Desktop where you will place all of the assets (PHP file, Private Key, and XML file you wish to decrypt). After you generate your keys go ahead and place your private key in this folder.
2. Copy and paste the script below into a text editor and save it as a PHP file (decryptXML.php). Save or move the file into the folder you created in step 1.
3. Download the XML data from iFormBuilder that you wish to decrypt. Rename the file to match the variable ($inFile) in the PHP file. In this example we have named this file (encrypted.xml). Move or copy this file into the folder that was created in step 1.
4. Open Terminal and navigate to the folder we created in step 1 which should be on the Desktop unless you saved this elsewhere.
A) cd Desktop (enter)
B) cd decryptData (enter)
C) php decryptXML.php (enter)
5. You will now have a new file in the folder you created called decrypted.xml which is exactly the same as the encrypted file except the encrypted fields will now be readable.