Scrypt Python code example incorrect
The example Python code for the Scrypt key derivation algorithm contains a wrong module name (current: **pyscrypt**, should be **scrypt**).
Page:
[https://cryptobook.nakov.com/mac-and-key-derivation/scrypt](https://cryptobook.nakov.com/mac-and-key-derivation/scrypt)
Current code:
```
import pyscrypt
salt = b'aa1f2d3f4d23ac44e9c5a6c3d8f9ee8c'
passwd = b'p@$Sw0rD~7'
key = pyscrypt.hash(passwd, salt, 2048, 8, 1, 32)
print("Derived key:", key.hex())
```
Code should be:
```
import scrypt
salt = b'aa1f2d3f4d23ac44e9c5a6c3d8f9ee8c'
passwd = b'p@$Sw0rD~7'
key = scrypt.hash(passwd, salt, 2048, 8, 1, 32)
print("Derived key:", key.hex())
```
0 条评论