hynek / argon2-cffi

Secure Password Hashes for Python
https://argon2-cffi.readthedocs.io/
MIT License
549 stars 47 forks source link

hash() got an unexpected keyword argument 'salt' #158

Closed EngineerHus closed 11 months ago

EngineerHus commented 11 months ago

Hi, Can someone guide me regarding why I am getting the following error: hash() got an unexpected keyword argument 'salt'?

The code looks as follows:

import argon2
from argon2 import profiles

def hash_password(password, parallelism, iterations, memorySize, hashLength,):
    params = {"parallelism": parallelism, "iterations": iterations, "memorySize": memorySize, "hashLength": hashLength}
    hasher = argon2.PasswordHasher.from_parameters(profiles.CHEAPEST)
    p = hasher.hash(password, salt=b"123456789")

The argon2id version I am using is 21.3.0

Thanks

EngineerHus commented 11 months ago

needs a version of 23.1.0 minimum