websauna.system.user.password module

The default password hashing implementation using Argon 2.

Argon 2 is the winner algorithm of Password Hashing Competition 2012-2015.

More information

class websauna.system.user.password.Argon2Hasher[source]

Bases: object

The default password hashing implementation using Argon 2.

hash_password(plain_text)[source]

Hash plain text password.

Parameters

plain_text (str) – Password.

Return type

str

Returns

Hash of the password.

verify_password(hashed_password, plain_text)[source]

Validate if given hash and password match.

Parameters
  • hashed_password (str) – Password hash.

  • plain_text (str) – Plain text password

Return type

bool

Returns

Boolean indicating if plain_text relates to hashed_password.