More Related Content
PPT
CHAPTER-7 C++ PROGRAMMING ( STRUCTURE IN C++) PPT
PPTX
PPTX
PPTX
PPTX
PPTX
Graph traversals in Data Structures DOCX
Simple example program for inheritance in c++ What's hot
PPTX
PDF
PPTX
Data Types, Variables, and Constants in C# Programming PPT
DOC
IMPLEMENTATION OF AUTO KEY IN C++ PDF
PPTX
15 puzzle problem using branch and bound PPT
PDF
PPTX
PDF
Constructors and Destructors PPT
PPTX
PPTX
PPTX
PDF
PPTX
PPTX
PPTX
Exception Handling in C++ PDF
Chapter 1 : Balagurusamy_ Programming ANsI in C Viewers also liked
PPT
PPT
PPTX
Network Hardware And Software PPTX
Data Encryption Standard (DES) PPTX
PPTX
PPTX
PPT
PPT
key distribution in network security PPT
PPTX
Play fair cipher
- 1.
PlayFair Cipher Codeby Khawar:
#include <iostream>
usingnamespace std;
intmain()
{
inti,j,x,r,n,z,c1,c2,p;c1=0;
char a2[25]={'a','b','c','d','e','f','g','h','i','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
char key[50],aa[100];
cout<<"write yourcyphertextheren";
cin.getline(aa,100);
cout<<"enteryourkeyheren";
cin.getline(key,50);
intll=strlen(key);
char a[5][5];
for(i=0;i<5;i++)
{
for(j=0;j<5;j++)
{
c2=0;
if(c1<ll)
{
for(p=0;p<25;p++)
{
if(key[c1]==a2[p])
- 2.
- 3.
- 4.
- 5.