Coders Packet

XOR Encryption in C++

By Sankalp Verma

A simple encryption method made in c++. This project takes a key and plaintext from the user and encrypts the plaintext by performing characterwise XOR on plaintext with key.

XOR Encryption in C++

XOR operation is a commonly used operation that is performed on two operands and returns a value based on comparison using the C++ bitwise('^')

operator. This project takes a key and plaintext from the user and encrypts the plaintext by performing bitwise XOR on plaintext with key.

 

XOR on plaintext

 

Algorithm

1. The key and the plain text are taken from the user. (Long Key is preferred for non-repetition).

2. Each character of the plain text is encrypted by performing bitwise XOR('^') operation with each character of the key.

3. The encrypted text is printed.

 

OUTPUT

Output

Download project

Reviews Report

Submitted by Sankalp Verma (sankalpshanky007)

Download packets of source code on Coders Packet