Created
May 14, 2021 03:00
-
-
Save markddavidoff/01a76d6f3c42d7497d6be4faa59cbfcb to your computer and use it in GitHub Desktop.
Revisions
-
markddavidoff created this gist
May 14, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ import hashlib import hmac string1 = 'plnlrtfpijpuhqylxbgqiiyipieyxvfsavzgxbbcfusqkozwpngsyejqlmjsytrmd' string2 = 'eBkXQTfuBqp\'cTcar&g*' key1 = hashlib.pbkdf2_hmac('sha1', string1.encode(), b'salt', 100000) key2 = hashlib.pbkdf2_hmac('sha1', string2.encode(), b'salt', 100000) hmac.new(key1, b"test", hashlib.sha256).hexdigest() # '8122f91c70f4ac2205fc2039fc27bac3d54ccd91ee5ebf8d58fe13b406abd34a' hmac.new(key2, b"test", hashlib.sha256).hexdigest() # '8122f91c70f4ac2205fc2039fc27bac3d54ccd91ee5ebf8d58fe13b406abd34a'