Dec-09-2016, 10:48 AM
Hi,
Firstly thanks for reading. I am not an python coder but I have been ask to encrypt some emails and I have incredible slow performance. I have googled the parts to get the script going but I am estimating a week before the encryption is finished. can some help me out
pii_email.txt has 11 million email address
Firstly thanks for reading. I am not an python coder but I have been ask to encrypt some emails and I have incredible slow performance. I have googled the parts to get the script going but I am estimating a week before the encryption is finished. can some help me out
pii_email.txt has 11 million email address
import binascii, hashlib salt = 'xxxxxxxxx' print "Opening the file..." target = open('HASHED_EMAILS.txt', 'w') print "Truncating the file. Goodbye!" target.truncate() with open('pii_emails.txt') as f: for line in f: # print(line.rstrip('\n')) # print('x') # print(binascii.hexlify(hashlib.pbkdf2_hmac('sha256', line.rstrip('\n'), salt, 100000))) target.write(binascii.hexlify(hashlib.pbkdf2_hmac('sha256', line.rstrip('\n'), salt, 100000))) target.write("\n") print "And finally, we close it." target.close()