keystone.common.password_hashers package

Submodules

Module contents

class keystone.common.password_hashers.PasswordHasher[source]

Bases: ABC

Abstract password hasher class

ident: str | None
name: str
static needs_rehash(hashed: str, **params) → bool[source]

Return True if the stored hash should be upgraded.

Subclasses compare hashed against the current work-factor parameters. The default returns False: only an algorithm mismatch (handled by the caller) would trigger a rehash.

keystone.common.password_hashers.b64s_decode(data: bytes)[source]

decode from shortened base64 format which omits padding & whitespace

uses default +/ altchars.