Created
February 25, 2022 07:02
-
-
Save saccadic/715349466f41faaceddf4665e5de9faf to your computer and use it in GitHub Desktop.
ハッシュによるパスワード認証
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bcrypt | |
| password = b"test123456" | |
| salt = bcrypt.gensalt() | |
| hashed = bcrypt.hashpw(password,salt) | |
| print(hashed) | |
| if bcrypt.checkpw(password, hashed): | |
| print("照合されました") | |
| else: | |
| print("照合されませんでした") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment