Encryption is a process that changes a code which can be understood to be a code that can not be understood (illegible). Encryption can be interpreted as a code or cipher. A cipher using an algorithm that can encode all data streams (stream) bits of a message into an incomprehensible cryptogram (unintelligible). Because cipher technique is a system that has been prepared for the automation, then the technique used in computer and network security systems.
While the description is a process to return the results of a cipher to the code beginning or the beginning of the data entered.
Algorithm.
• Encryption
Print encryption algorithm
Declaration:
plain, cipher: string
key, i: Integer
Description:
read (key, plain)
for i = 0 to strlen (plain) do
ciphers [i] <= (plain [i] + key) mod 128;
end for
write (cipher)
• Description
Print a description of the algorithm
Declaration:
ciphers, text: string
key, i: Integer
Description:
read (key, cipher)
for i = 0 to strlen (cipher) do
text [i] <= (cipher [i] - key) mod 128;
end for
write (text)
Encryption Program And Description In C + +.
While the description is a process to return the results of a cipher to the code beginning or the beginning of the data entered.
Algorithm.
• Encryption
Print encryption algorithm
Declaration:
plain, cipher: string
key, i: Integer
Description:
read (key, plain)
for i = 0 to strlen (plain) do
ciphers [i] <= (plain [i] + key) mod 128;
end for
write (cipher)
• Description
Print a description of the algorithm
Declaration:
ciphers, text: string
key, i: Integer
Description:
read (key, cipher)
for i = 0 to strlen (cipher) do
text [i] <= (cipher [i] - key) mod 128;
end for
write (text)
Encryption Program And Description In C + +.
# Include <cstdlib>
# Include <iostream>
using namespace std;
cryptography class {
friend istream & operator>> (istream &, cryptography &);
friend ostream & operator <<(ostream &, cryptography &);
public:
cryptography ();
void encryption ();
void description ();
private:
char plain [100], cipher [100], text [26];
int key;
};
cryptography:: cryptography () {
court <<"\ t \ tSlamet Islan Al Hidayah" <<endl;
court <<"\ t \ t 10018075" <<endl;
court <<endl;
court <<"Program To encrypt and Description Text \ n \ n";
court <<endl;
}
istream & operator>> (istream & ins, cryptography & mlebu) {
court <<"Enter key:";
in>> mlebu.key;
court <<"Enter character:";
in>> mlebu.plain;
return in;
}
void cryptography: encryption () {
for (int i = 0; i <strlen (plain); i + +) {
ciphers [i] = (plain [i] + key)% 128;}
court <<endl <<endl;
}
void cryptography:: description () {
for (int i = 0; i <strlen (cipher); i + +) {
text [i] = (cipher [i]-key)% 128;}
}
ostream & operator <<(ostream & out, cryptography & metu) {
out <<"the result of encryption:";
for (int i = 0; i <strlen (metu.plain); i + +) {
out <<metu.chiper [i];
}
out <<endl;
out <<"the description:";
for (int j = 0; j <strlen (metu.chiper); j + +) {
court <<metu.teks [j];
}
out <<endl <<endl;
return out;
}
int main (int argc, char * argv [])
{
cryptography x;
cin>> x;
x.enkripsi ();
x.deskripsi ();
court <<x;
system ("PAUSE");
return EXIT_SUCCESS;
}
Output :
Well that's the program that I can make,,,,,!
If there are less jelass know any mistake, do not hesitate to leave a comment ataun advice. So that I can fix it later terimakasihh over his visit,,
Regards super ..
0 Response to " ENCRYPTION AND DECRYPTION "
Post a Comment