Python Forum
encyption help slow perfomance
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
encyption help slow perfomance
#1
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

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()
Reply


Messages In This Thread
encyption help slow perfomance - by python_newbie - Dec-09-2016, 10:48 AM
RE: encyption help slow perfomance - by nilamo - Dec-09-2016, 07:33 PM
RE: encyption help slow perfomance - by stranac - Dec-10-2016, 04:15 AM
RE: encyption help slow perfomance - by nilamo - Dec-10-2016, 07:07 PM
RE: encyption help slow perfomance - by Larz60+ - Dec-12-2016, 03:59 PM
RE: encyption help slow perfomance - by nilamo - Dec-12-2016, 04:22 PM
RE: encyption help slow perfomance - by Larz60+ - Dec-12-2016, 07:46 PM
RE: encyption help slow perfomance - by micseydel - Dec-12-2016, 09:30 PM
RE: encyption help slow perfomance - by wavic - Dec-13-2016, 06:13 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020