|
1 | 1 | # ascii-encryption-python
|
2 | 2 | Beginner guide to ascii based encryption implemented in Python
|
| 3 | + |
| 4 | +Getting started |
| 5 | +---------------- |
| 6 | +This is just a simple encryption algorithms that can be cool when it comes to understanding and exploring how does encryption works, but not seriously used to handle security on real life circumstances |
| 7 | + |
| 8 | +To get started with repo you might have to clone or download the repository just as shown below; |
| 9 | + |
| 10 | +```bash |
| 11 | + |
| 12 | +git clone https://github.com/Kalebu/ascii-encryption-python |
| 13 | + |
| 14 | +``` |
| 15 | + |
| 16 | +Basics |
| 17 | +---------------- |
| 18 | +If you're new to ascii encryption, this simple involving converting the alphabetics to their ascii numerical value and using a secret number to add or substract from their real value and then turning back into characters as encrypted one. |
| 19 | + |
| 20 | +For instance |
| 21 | + |
| 22 | +```bash |
| 23 | + |
| 24 | +Encrypting |
| 25 | + |
| 26 | +a - > 97 -> 97 (+|-) secret_number -> new characer |
| 27 | + |
| 28 | +Lets say our secret number is 5 |
| 29 | + |
| 30 | +a -> 97 -> 97 + 5 -> f |
| 31 | + |
| 32 | +Decrypting |
| 33 | + |
| 34 | +To descrypt we need to know the secret number otherwise we wont be able to do it so |
| 35 | + |
| 36 | +f -> 102 -> 102 (+|-) secret number -> decrypted character |
| 37 | + |
| 38 | +Since we know the serect number is 5 |
| 39 | + |
| 40 | +f -> 102 -> 102 - 5 > a |
| 41 | + |
| 42 | +``` |
| 43 | + |
| 44 | +In this repository I have implemented two simple function just do that, which take a textual input of any size and then encrypt it using ascii value based on your secret number and then it will return back encrypted text. |
| 45 | + |
| 46 | +Samewise to decryption, you are going to specify the secret number and then it will recieve your encrypted text input and then render to you decrypted text output |
| 47 | + |
| 48 | + |
| 49 | +Demo |
| 50 | +------------ |
| 51 | + |
| 52 | +```python |
| 53 | +>>> from algorithms import encrypt , decrypt |
| 54 | +>>> army_text = "Throw the missiles at 9pm" |
| 55 | +>>> encrypt(army_text, key=10) |
| 56 | +'^r|y\x81*~ro*ws}}svo}*k~*Czw' |
| 57 | +>>> decrypt('^r|y\x81*~ro*ws}}svo}*k~*Czw', key=10) |
| 58 | +'Throw the missiles at 9pm' |
| 59 | +``` |
| 60 | + |
| 61 | +Explore it |
| 62 | +----------- |
| 63 | +Now keep explore it by testing it with various input links to see what links it will scrap |
| 64 | + |
| 65 | +Give it a star |
| 66 | +-------------- |
| 67 | +Did you find this information useful, then give it a star |
| 68 | + |
| 69 | + |
| 70 | +Credits |
| 71 | +----------- |
| 72 | +All the credits to [kalebu](github.com/kalebu) |
0 commit comments