PII Data Hashing
Rokt is aware of the importance and sensitivity of your Personally Identifiable Information (PII) and takes care to preserve the confidentiality and security of your customer data.
To avoid the transmission of sensitive data, Rokt provides tools and instructions on how to cryptographically hash your PII before you send it to us for suppression, segmentation or conversion analysis.
If you have a customer list or data from your site, such as subscriber email addresses, you’re ready to get started.
What is Hashing?
Cryptographic hashes are functions that convert your data to a mix of numbers and letters which is practically impossible to reverse. They’re easy to generate, infeasible to decipher and unique for each value you hash. Slightly changing an email address for example will generate a completely different hash value using these methods.
Rokt does not need to decipher these hashes, as we are only looking for your customers who have already engaged with the Rokt platform, or will engage in the future. When customers consent to providing their data, we will hash it ourselves. This is how we find matches between our customers and yours.
Preparing Your File
Once something is hashed, it’s difficult to determine if it worked successfully, so making sure you’ve prepared your file correctly is very important.
- Please create your file of email addresses in the following format (for both Mac and PC) to ensure that there are no problems when hashing.
- Create a text (
*.txt
) file - choose Windows Formatted Text (.txt
) - Include only the email addresses of your customers. This is the only field Rokt currently uses to identify customers on the network.
- All email addresses have to be lowercased.
- Place each email address on new line. Do not include commas, semicolons or other special characters to separate them.
- Ensure there are no leading or trailing spaces around your email addresses.
- Ensure there is no empty line at the bottom of the file.
- Save your file on your Desktop or other easily accessible location (especially for Mac users).
Hashing on a PC
For computers running Windows, you will need to download and use an executable file that Rokt has produced. You may need Administrator privileges on your device to run this application, depending on your version of Windows.
- Download and open RoktAppsHashTool.exe. This application only runs on Windows. You can find it at the bottom of this page under Attachments. You may be prompted by a security message to confirm that you would like to run the application, depending on the Windows version you are running. Allow the application to continue.
- Click "Select a file from your computer" and choose the file that you have prepared according to the instructions above.
- Select the format that you would like to hash your emails in. Choose either MD5 or SHA256. These are the only hashing algorithms that Rokt currently supports. Unless you have a preference, it does not matter which one you choose.
- Click "Select the output file" and you will be able to choose where you want to save the output file after the tool has finished hashing.
- Click Hash File - Depending on the size of your file, this may take a while to process. You will be shown the progress of the hashing process.
- When it is finished, you can find the file in the destination that you selected above. The file name will be the original file name that you chose to upload, but with an .MD5 or .SHA256 file extension instead of .TXT, depending on the hash type that you chose.
- If you would like to double-check, you can right-click the output file and Open with Notepad or a similar program to see your hashed values.
Your file is now ready to transmit to Rokt safely and securely.
Hashing on a Macintosh
You will require Mac OS X 10.10 (Yosemite) or higher to perform this function. Please do not use copy and paste in the terminal. It is preferable to type the commands in yourself.
- Open Spotlight, search for Terminal and open the application.
- Instruct Terminal where the file you want to hash has been saved, by typing:
cd {File Location} Is {File Name}
(where "I" is an uppercase "i")
Example:
cd Desktop Is roktemails.txt
Last login: Fri Dec 25 12:02:37 on ttys001
ROKT-mbp: ~ roktuser$ cd Desktop Is roktemails.txt
- Press Enter. If successful, the Terminal will return your "File Location" and your "User Name" on a new line. Last login: Fri Dec 25 12:02:40 on ttys001
ROKT-mbp: ~ roktuser$ cd Desktop Is roktemails.txt
ROKT-mbp: Desktop roktuser$
- Instruct the Terminal to get rid of invisible characters that will affect the hashing process
tr -d ‘\r’ < {FileName} > {Desired Output File name}
Example:
tr -d ‘\r’ < roktemails.txt > roktemailscleaned.txt
Last login: Fri Dec 25 12:02:40 on ttys001
ROKT-mbp: ~ roktuser$ cd Desktop Is roktemails.txt
ROKT-mbp: Desktop roktuser$ tr -d ‘\r’ < roktemails.txt > roktemailscleaned.txt
- Press Enter. If successful, the Terminal will return your File Location and your User Name on a new line.
Last login: Fri Dec 25 12:02:40 on ttys001
ROKT-mbp: ~ roktuser$ cd Desktop Is roktemails.txt
ROKT-mbp: Desktop roktuser$ tr -d ‘\r’ < roktemails.txt > roktemailscleaned.txt
ROKT-mbp: Desktop roktuser$
- Now, instruct Terminal to hash the file that you just cleaned using the MD5 hash function, by typing:
cat {File Name} | while read line; do echo -n $line | md5; done > {Desired Output File name}
Example:
cat roktemailscleaned.txt | while read line; do echo -n $line | md5; done > roktemailscleanedandhashed.txt
Last login: Fri Dec 25 12:02:40 on ttys001
ROKT-mbp: ~ roktuser$ cd Desktop Is roktemails.txt
ROKT-mbp: Desktop roktuser$ tr -d ‘\r’ < roktemails.txt > roktemailscleaned.txt
ROKT-mbp: Desktop roktuser$ cat roktemailscleaned.txt | while read line; do echo -n $line | md5; done > roktemailscleanedandhashed.txt
- Press Enter. The selected file will start processing.
Last login: Fri Dec 25 12:02:40 on ttys001
ROKT-mbp: ~ roktuser$ cd Desktop Is roktemails.txt
ROKT-mbp: Desktop roktuser$ tr -d ‘\r’ < roktemails.txt > roktemailscleaned.txt
ROKT-mbp: Desktop roktuser$ cat roktemailscleaned.txt | while read line; do echo -n $line | md5; done > roktemailscleanedandhashed.txt
ROKT-mbp: Desktop roktuser$
- Do not close Terminal while it is processing or progress will stop. This may take a while depending on the size of your file.
- Your file will then be generated in the same folder that you have specified in step 3.
Mac Troubleshooting
Q: How do I specify the location of my file if it’s in a sub-folder?
A. If you have saved your file in a subfolder or subdirectory and do not want to move it, you need to specify the location of the file using the folder hierarchy, separated by forward slashes. You would indicate the folders you would need to click to access that file.
Example:
cd Desktop/RussianDolls/BigDolls/MediumDoll/SmallDoll Is roktemail.txt
Q: Why is it telling me ‘No such file or directory’ when I try to locate a file?
A. There are a few reasons this could happen:
- The file does not exist in the folder you specified
- The file name is misspelled
- A folder name is misspelled
- You opened the terminal before the file was in the location that you specified
Q: How can I tell if the process is still running so that I can close Terminal
A. You can tell if the process is still running by looking at the top of the Terminal window. The name of the window will read:
{File Location} - bash - {Pixel} x {Pixel}
(where Pixel refers to the width and height of the Terminal window)
While the process is still running, the word "bash" will quickly switch back-and-forth between "bash" and "MD5". Alternatively, if you try to close the Terminal window while the process is still running, you will be asked to confirm as there is a process still running. You will not get this notification if it has finished.