crypto_utils icon indicating copy to clipboard operation
crypto_utils copied to clipboard

It doesn't work for me

Open mzing opened this issue 9 years ago • 1 comments

Thank for the idea, but it didn't work for me in python 2.x.x because of 'pbkdf2_hmac'. After some experiment I've done some changes to make this utility run in python3: 1c1

< #!/usr/bin/env python

!/usr/bin/env python3

34,35c34,36 < md_str = hashlib.sha512(key).hexdigest()

< salt = hashlib.sha512(key[::-1]).hexdigest()

key_bytes = key.encode('utf-8')
md_str = hashlib.sha512(key_bytes).hexdigest()
salt = hashlib.sha512(key_bytes[::-1]).hexdigest()

40,41c41,42 <

< m = hashlib.pbkdf2_hmac('sha512', bytearray(extended_key), salt, 100000)

m = hashlib.pbkdf2_hmac('sha512', bytearray(extended_key.encode('utf-8')), salt.encode('utf-8'), 100000)

90,91c91,92 < print "Enter a message:"

< raw = raw_input()

    print ("Enter a message:")
    raw = input()

97c98

< print "Output extension is required!"

            print ("Output extension is required!")

111c112

< print "[OK] Output: " + outfile

    print ("[OK] Output: " + outfile)

113,115c114,116 < print "---" < print output

< print "---"

    print ("---")
    print (output)
    print ("---")

mzing avatar May 26 '16 06:05 mzing

Can you explain more, what doesn't work? I can try to help. As in, what file are you trying to run and how do you run it?

Wishes from Sweden! ^_^

loneicewolf avatar Feb 23 '24 10:02 loneicewolf