June 2019
Beginner to intermediate
770 pages
19h 24m
English
Perhaps the most important advice that can possibly be offered on the subject of security is the following:
Here's an example class that shows us how salted password hashing might work:
from hashlib import sha256import osclass Authentication: iterations = 1000 def __init__(self, username: bytes, password: bytes) -> None: """Works with bytes. Not Unicode strings.""" self.username = username self.salt = os.urandom(24) self.hash = self._iter_hash( self.iterations, self.salt, username, password) ...
Read now
Unlock full access