https://github.com/singhxtushar/char_cipher_prog
Cipher program to encode and decode the secret message. In this program I have only use character and spaces but it have anything like numbers, symbols and etc.
https://github.com/singhxtushar/char_cipher_prog
Last synced: 3 months ago
JSON representation
Cipher program to encode and decode the secret message. In this program I have only use character and spaces but it have anything like numbers, symbols and etc.
- Host: GitHub
- URL: https://github.com/singhxtushar/char_cipher_prog
- Owner: SINGHxTUSHAR
- Created: 2023-03-12T00:43:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-12T00:50:13.000Z (over 2 years ago)
- Last Synced: 2023-06-01T08:49:25.089Z (over 2 years ago)
- Language: C++
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CHAR_CIPHER_PROG
Cipher program to encode and decode the secret message. In this program I have only use character and spaces but it have anything like numbers, symbols and etc.A simple and very old method of sending secret messages is the substitution cipher.
We all have used this cipher with our friends when we were a kid.
Basically, each letter of the alphabet gets replaced by another letter of the alphabet.
For example, every 'a' get replaced with an 'X', and every 'b' gets replaced with a 'Z', etc.
Write a program thats ask a user to enter a secret message.
Encrypt this message using the substitution cipher and display the encrypted message.
Then decryped the encrypted message back to the original message.We will be using 2 strings below for the subsitition.
For example, to encrypt we can replace the character at position n in alphabet string
with the character at position n in key string.
To decrypt we can replace the character at position n in key
with the character at position n in alphabet.
Currently the cipher only substitutes letters - we could easily add digits, puncuation, and so forth.
Also, currently the cipher always substitues a lowercase letter with an uppercase letter and vice-versa.
using c++ style string and their operations and functionality.
Alot of improvement can be done in this program like adding a large set of string and character, number , symbols and etc.
I had just code the simplest and easy to understand cipher for basic functionality.