May 2012
Intermediate to advanced
679 pages
16h 56m
English
Science of encryption was at its peak during World War II. Soldiers wanted their signals to be encrypted. Many scientists were involved in reverse process, which is decrypting the enemy messages. Today passwords in computers are encrypted. Let us study a simple program.
Problem: Read a text file and encrypt it.
Solution: There are sophisticated algorithms for encryption. Here we will use a simple bit-wise NOT operation. It normally converts a printable character into a non-printable one. Here we assume input file as “encr_inp.txt” and create output file “encr_out.txt”. See Program 14.12.
// encrypt.cpp#include<iostream.h>#include <fstream.h>#include <conio.h> ...
Read now
Unlock full access