diff --git a/hackathon.ipynb b/hackathon.ipynb new file mode 100644 index 0000000..11772c4 --- /dev/null +++ b/hackathon.ipynb @@ -0,0 +1,101 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 3, + "id": "f260e79a-a759-489a-929d-3b745b374091", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Salt :\n", + "b'$2b$12$0AVBZWc7KOn0XoFdTccyQe'\n", + "Hashed\n", + "b'$2b$12$0AVBZWc7KOn0XoFdTccyQezVFJf1PJsszzZgKCNLdgakjH1k6KhTO'\n" + ] + } + ], + "source": [ + "\n", + "\n", + "import bcrypt\n", + " \n", + "# Declaring our password\n", + "password = b'Ashok123'\n", + " \n", + "# Adding the salt to password\n", + "salt = bcrypt.gensalt()\n", + "# Hashing the password\n", + "hashed = bcrypt.hashpw(password, salt)\n", + " \n", + "# printing the salt\n", + "print(\"Salt :\")\n", + "print(salt)\n", + " \n", + "# printing the hashed\n", + "print(\"Hashed\")\n", + "print(hashed)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "c55de8d6-f7b7-4220-9148-cf91f23f754b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Salt :\n", + "b'$2b$12$boDQKQJoqoSqFDIgSYvM9O'\n", + "Hashed\n", + "b'$2b$12$boDQKQJoqoSqFDIgSYvM9OkZq8ZAvPgjKKNehIDJB8telKi3k.B3W'\n" + ] + } + ], + "source": [ + "import bcrypt\n", + " \n", + "# Declaring our password\n", + "password = b'Ashok123'\n", + " \n", + "# Adding the salt to password\n", + "salt = bcrypt.gensalt()\n", + "# Hashing the password\n", + "hashed = bcrypt.hashpw(password, salt)\n", + " \n", + "# printing the salt\n", + "print(\"Salt :\")\n", + "print(salt)\n", + " \n", + "# printing the hashed\n", + "print(\"Hashed\")\n", + "print(hashed)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.6" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}