X-Git-Url: https://git.mdrn.pl/cas.git/blobdiff_plain/9217713db2e16d23f9ba16f90db5e524b4cdabaa..68302c7b34fabd100e3b1b39e805492b631d0f04:/src/cas/hashers.py diff --git a/src/cas/hashers.py b/src/cas/hashers.py new file mode 100644 index 0000000..c7ae39a --- /dev/null +++ b/src/cas/hashers.py @@ -0,0 +1,8 @@ +from django.contrib.auth.hashers import BCryptPasswordHasher + + +class FNPBCryptPasswordHasher(BCryptPasswordHasher): + def salt(self): + bcrypt = self._load_library() + return bcrypt.gensalt(self.rounds, prefix=b"2a") +