Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrypt Python code example incorrect #71

Open
michelm opened this issue Feb 11, 2024 · 0 comments
Open

Scrypt Python code example incorrect #71

michelm opened this issue Feb 11, 2024 · 0 comments

Comments

@michelm
Copy link

michelm commented Feb 11, 2024

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

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())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant