Update README.md

This commit is contained in:
Bill Buchanan
2021-02-11 17:43:44 +00:00
committed by GitHub
parent 4474b75922
commit 32ba752bbc

View File

@@ -459,7 +459,6 @@ which has a key length of 16 bytes (128 bits - dklen), uses a salt byte array, a
Web link (PBKDF2): http://www.asecuritysite.com/encryption/PBKDF2
```python
import hashlib;
import passlib.hash;
import sys;
@@ -473,8 +472,8 @@ if (len(sys.argv)>1):
if (len(sys.argv)>2):
salt=sys.argv[2]
print ("PBKDF2 (SHA1):",passlib.hash.pbkdf2_sha1.encrypt(string, salt=salt.encode()))
print ("PBKDF2 (SHA256):",passlib.hash.pbkdf2_sha256.encrypt(string, salt=salt.encode()))
print ("PBKDF2 (SHA1):",passlib.hash.pbkdf2_sha1.hash(string, salt=salt.encode()))
print ("PBKDF2 (SHA256):",passlib.hash.pbkdf2_sha256.hash(string, salt=salt.encode()))
```