Name - Pallavi Bharti Roll No - 18141112 Experiment 3: Program
Name - Pallavi Bharti Roll No - 18141112 Experiment 3: Program
Name - Pallavi Bharti Roll No - 18141112 Experiment 3: Program
Roll No - 18141112
Experiment 3
Implement Poly-alphabetic Vigenere Cipher using any programming language
Program –
#include<bits/stdc++.h>
using namespace std;
string generateKey(string str, string key)
{
int x = str.size();
cipher_text.push_back(x);
}
return cipher_text;
}
x += 'A';
orig_text.push_back(x);
}
return orig_text;
}
int main()
{
string str;
string keyword;
cout<<"Original Message: ";
cin>>str;
cout<<"Key: ";
cin>>keyword;
string key = generateKey(str, keyword);
cout<<"Generated Key: "<<key;
string cipher_text = cipherText(str, key);
Output –