Skip to content

Commit

Permalink
format and grammar edits up to encryption function
Browse files Browse the repository at this point in the history
  • Loading branch information
Kierst01 committed Jan 27, 2024
1 parent 761e987 commit 659aa53
Showing 1 changed file with 38 additions and 9 deletions.
47 changes: 38 additions & 9 deletions docs/example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@
"source": [
"## Bob's Journey\n",
"\n",
"For the past 10 years, Bob has been using the password 'baseball' for all his online accounts. While this made them easy to remember, it also made them easy to hack. Unfortunately for Bob, some not-so-flattering photos of his trip to Cancun were sent to **all** of his Facebook friends (think sunglasses burn). Due to this incident, Bob has decided to up his password security and begins by testing the strength of his previously used password. "
"For the past 10 years, Bob has been using the password 'baseball' for all his online accounts. While this made them easy to remember, it also made them easy to hack. Unfortunately for Bob, some not-so-flattering photos of his trip to Cancun were sent to **all** of his Facebook friends. Due to this incident, Bob has decided to up his password security using our Passwordler functions. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Password Strength"
"### Password Strength\n",
"\n",
"The function `password_strength` allows users to test the strength-rating of their passwords, giving ratings of 'Weak', 'Good', and 'Strong'. It takes one argument, the password as a string.\n",
"\n",
"#### Testing it out\n",
"Bob begins by testing the strength of his previously used password, 'baseball'."
]
},
{
Expand Down Expand Up @@ -53,7 +58,7 @@
"source": [
"As we can see, his password was weak! No wonder they were able to hack his account. Next he tries a few more variations to see if he can create something stronger.\n",
"\n",
"***Note**: A password is classified as weak if it is found in our list of common passwords, or is less than 8 characters and contains less than two capital letters, numbers or special characters. A good password contains between 8-12 characters and at least two capital letters, numbers or special characters. Finally, a strong password has 12 or more characters and at least one capital letter, one number and one special character.* "
"***Note**: A password is classified as weak if it is found in our list of common passwords, or does not meet the criteria for a 'Good' password* "
]
},
{
Expand All @@ -76,6 +81,15 @@
"password_strength('Baseball4life')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Almost there, but he really want a 'Strong' password.\n",
"\n",
"***Note**: A good password contains at least 8 characters and at least two capital letters, numbers or special characters in total.*"
]
},
{
"cell_type": "code",
"execution_count": 3,
Expand All @@ -100,7 +114,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Finally! Something Bob can work with, he's found a password he likes that is also strong. But then Bob reads about our password generator and decides to give that a try instead."
"Finally! Something Bob can work with, he's found a password he likes that is also strong. But then Bob reads about our password generator and decides to give that a try instead.\n",
"\n",
"***Note**: A strong password has 12 or more characters and at least one capital letter, one number and one special character each.*"
]
},
{
Expand All @@ -109,7 +125,7 @@
"source": [
"### Generate Password\n",
"\n",
"The `generate_password` function allows users to create a secure, customized password.\n"
"The `generate_password` function allows users to create a secure, customized password. It has three optional arguments. The first argument, length, corresponds to the desired length of the password given as an integer. Its minimum and default length is 12 and it's maximum is 100. The second argument is include_symbols while the third argument is include_numbers. They both take a boolean value, indicating whether special characters and numbers should be included in the generated password."
]
},
{
Expand All @@ -118,7 +134,9 @@
"source": [
"#### First try: default settings\n",
"\n",
"Bob creates a password with the default settings. This returns a password of length 12, with at least one uppercase letter, number and symbol. "
"To start out, Bob creates a password with the default settings. \n",
"\n",
"***Note**: This returns a password of length 12, with at least one uppercase letter, number and symbol.*"
]
},
{
Expand Down Expand Up @@ -154,7 +172,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Intrigued, Bob decides to generate a much longer password, setting the `length` to 100 characters. The minimum accepted length is 12 characters."
"Intrigued, Bob decides to generate a much longer password, setting the `length` to its maximum, 100 characters."
]
},
{
Expand Down Expand Up @@ -188,7 +206,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Next, he experiments with the `include_symbols` and `include_numbers` arguments. He sets both to false, overriding the default settings. This gives him a password with only letters: removing symbols and numbers"
"While this was a fun, it is simply too long to be useful for Bob. Next, he experiments with the `include_symbols` and `include_numbers` arguments. He sets both to false, overriding the default settings. \n",
"\n",
"***Note**: This gives him a password with only letters: removing symbols and numbers*"
]
},
{
Expand All @@ -211,13 +231,20 @@
"generate_password(include_symbols=False, include_numbers=False)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Ultimately, Bob decides to stick to his 'Baseball4life!' password from earlier, but wants to try out our encryption function to further increase his security."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Encrypt a Password\n",
"\n",
"The `encrypt_password` function encrypts a message using a simple substitution cipher, by substituting each character with a corresponding character from a shuffled set. It uses the same set of characters as the decryption function."
"The `encrypt_password` function encrypts a message using a simple substitution cipher, by substituting each character with a corresponding character from a shuffled set. It uses the same set of characters as the decryption function, so they can work in tandem. "
]
},
{
Expand Down Expand Up @@ -291,6 +318,8 @@
"metadata": {},
"source": [
"### Decrypt a Password\n",
"The `decrypt_password` function decrypts a message that has previously been encrypted with the `encrypt_password` function. It uses the same seed that has been used for the `encrypt_password`.\n",
"\n",
"#### First try: default setting\n",
"The next time Bob tries to log in to facebook, he can't remember his password. But Bob knows where he has saved his encrypted password. He cannot find the seed,so he tries to decrypt his encrypted password with the default settings:"
]
Expand Down

0 comments on commit 659aa53

Please sign in to comment.