mirror of
https://github.com/billbuchanan/appliedcrypto.git
synced 2026-02-21 11:18:02 +00:00
Update README.md
This commit is contained in:
@@ -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()))
|
||||
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user