Skip to content

TariqCodeBit/SimpleEncryption

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Encryption Program

This is a simple encryption and decryption program implemented in C++ that demonstrates how to apply a basic encryption algorithm. The program uses a key-based system to encrypt and decrypt user-inputted strings.

Features

  • Encryption: The program encrypts the user's input string by adding a key value to each character's ASCII code.
  • Decryption: The program decrypts the encrypted string by subtracting the key value from each character's ASCII code.
  • Key Algorithm: A simple algorithm using a constant key value generated by a mathematical expression (pow(2, 2 * 5 / 4)).

How it works

  1. User Input:

    • The program prompts the user to input a string or password that they want to encrypt.
  2. Encryption:

    • The Encryptionvar function takes the input string and the encryption key (calculated as pow(2, 2 * 5 / 4)).
    • Each character of the string is modified by adding the key value to its ASCII code.
  3. Decryption:

    • The Decryption function takes the encrypted string and subtracts the same key value from each character's ASCII code to retrieve the original string.
  4. Key Calculation:

    • The key is calculated using the expression pow(2, 2 * 5 / 4), which results in the key value 16.

code clone

git clone https://github.com/TariqCodeBit/SimpleEncryption.git
Example
Please Enter Your string or password you need Encryption:

Tarek

_______________[ Encryption ]_______________________

Xevio
_______________[ Decryption ]______________________

Tarek

Author

  • by Tarek.

About

Simple Encryption using CPP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages