Python用のパスワードを安全にハッシュ化する「bcrypt」のインストール

スポンサーリンク

Python用のパスワードを安全にハッシュ化する「bcrypt」ライブラリのインストールについて解説しています。

bcrypt(https://github.com/pyca/bcrypt/)は、ソフトウェアとサーバーに適したパスワードを安全にハッシュ化するライブラリです。

■Python

今回のPythonのバージョンは、「3.8.5」を使用しています。(Windows10)(pythonランチャーでの確認)

■bcryptをインストールする

bcryptをインストールを行いますが、今回はpipを経由してインストールを行うので、まずWindowsのコマンドプロンプトを起動します。

pip install bcrypt

起動後、上記のコマンドを入力し、Enterキーを押します。

なお、今回は、pythonランチャーを使用しており、Python Version 3.8.5にインストールを行うために、pipを使う場合にはコマンドでの切り替えを行います。

py -3.8 -m pip install bcrypt

切り替えるために、上記のコマンドを入力し、Enterキーを押します。

Defaulting to user installation because normal site-packages is not writeable
Collecting bcrypt
Downloading bcrypt-3.2.0-cp36-abi3-win_amd64.whl (28 kB)
Requirement already satisfied: six>=1.4.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from bcrypt) (1.15.0)
Requirement already satisfied: cffi>=1.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from bcrypt) (1.14.5)
Requirement already satisfied: pycparser in c:\users\user_\appdata\roaming\python\python38\site-packages (from cffi>=1.1->bcrypt) (2.20)
Installing collected packages: bcrypt
Successfully installed bcrypt-3.2.0

Enterキーを押すと、インストールが開始され、上記のように「Successfully installed」と表示されます。これが表示されれば、bcryptが正常にインストールされたことになります。

なお、今回はbcryptのバージョン3.2.0をインストールしました。

コメント

タイトルとURLをコピーしました