ACC Project For AES DES
ACC Project For AES DES
ACC Project For AES DES
ACC
(Advanced Cryptography & Cryptanalysis)
Submitted by:
Khawar Abbas Khan
MS CS Semester 1
Submitted to :
Dr M Shamim Baig
C++ Code
#include<iostream>
using namespace std;
/* only caps and small caps alphabet would be considered for encryption other symbols
would remain as it is. */
for(int i=0;i<x.length();i++)
{
if(isupper(x[i]))
cipher += (x[i] + n - 65)%26 + 65; /* here x[i] would be ASCII value of corresponding
alphabet */
else if(islower(x[i]))
cipher += (x[i] + n - 97)%26 + 97;
else
cipher += x[i]; /* other symbols other than alphabets would remain as it is. */
}
return cipher;
}
int main()
{
int key;
string text;
cout << "enter text:- ";
getline(cin,text);
cout << "enter key:- ";
cin >> key;
decrypt(cipher);
}
Task 2:
Use system in task1 (parts 1 & 2) to Encrypt & Decrypt your Name.