Skip to content

This is a simple Java program that demonstrates encryption and decryption of messages using a key-value pair for each alphabet. It provides functionality to encrypt a message and decrypt an encrypted code back to the original message.

Notifications You must be signed in to change notification settings

krishanmurariji/Encryption-Decryption

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Java Encryption and Decryption Program

This is a simple Java program that demonstrates encryption and decryption of messages using a key-value pair for each alphabet. It provides functionality to encrypt a message and decrypt an encrypted code back to the original message.

Features

  • Encryption: The program takes a user input message and encrypts it using a predefined key-value pair for each alphabet character. It converts each character of the message to its corresponding integer value.
  • Decryption: The program allows the user to input an encrypted code and decrypts it back to the original message using the reverse mapping of the key-value pairs.
  • Customizable Key: The key-value pairs for encryption and decryption can be customized according to specific requirements.
  • Input Validation: The program handles input validation to ensure that only valid messages and encrypted codes are accepted.

Usage

  1. Compile the Program: Compile the Java program (EncryptionDecryption.java) using any Java compiler.

  2. Run the Program: Execute the compiled program to start the encryption and decryption process. Follow the instructions provided in the console.

  3. Input Message: Enter the message that you want to encrypt. You can include any characters, including whitespace.

  4. Encrypted Code: The program will generate an encrypted code based on the input message and display it to the user.

  5. Input Encrypted Code: Enter the encrypted code when prompted by the program.

  6. Decrypted Message: The program will decrypt the encrypted code and display the original message to the user.

Key-Value Pairs

The encryption and decryption process relies on key-value pairs for each alphabet character. By default, the program provides the following key-value pairs:

About

This is a simple Java program that demonstrates encryption and decryption of messages using a key-value pair for each alphabet. It provides functionality to encrypt a message and decrypt an encrypted code back to the original message.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages