2021-csci-ga3205-midterm/README.md

25 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2021-10-24 16:53:47 +00:00
# 2021 CSCI-GA3205 Midterm
Author: Vicky Rampin
2021-10-24 16:53:47 +00:00
## Prompt
2021-10-24 16:53:47 +00:00
Gets a text (would serve as plaintext) and a password (would serve as key) from the user and prints the ciphertext by using the Vigenère method. Then, complete it so it can decrypt as well.
## Installation
This script is made with Python 3.8 and uses the `argparse` library. Ensure that you have [Python 3.8+](https://www.python.org/downloads/) installed in order to run this script correctly.
2021-10-24 16:53:47 +00:00
## Usage
First, clone this repository to your machine. Open the command line on your machine and navigate to where you cloned this repository. To get help using `cd`, use [this tutorial](https://swcarpentry.github.io/shell-novice/02-filedir/index.html).
2021-10-24 16:53:47 +00:00
Before running the script, you should know it expects two arguments:
1. `--text` : takes a string that will act as either the plaintext or ciphertext (depending on whether we're encrypting or decrypting)
2. `--key`: takes a string that will act as the key used to encrypt and decrypt
2021-10-24 16:53:47 +00:00
From there, you can run it like so:
2021-10-24 16:53:47 +00:00
2021-10-24 18:55:14 +00:00
```
$ python index.py --text "New York University" --key "NYU"
Encrypted ciphertext: ACQLMLXSHVTYEQCGW
Decrypted plaintext: gmirwddczbdqkaumg
```
2021-10-24 16:53:47 +00:00
First the script will encrypt the user submitted text as if it was plaintext and show the user the resulting ciphertext. Then, the script will decrypt the user submitted text as if it was ciphertext, and then show the user the resulting plaintext. Make sure you have the key and the text enclosed in quotes!