== 개인키, 공개키 (개인키 : 112, 공개키 : 144) == {{{~cpp #include #include using namespace std; const int KEY = 112; void main() { ifstream fin ("source.txt"); ofstream fout ("source_enc.txt"); int temp; char ch; char array[100]; cout << "암호값 : "; int count = 0; do{ fin.get(ch); if (fin.eof()) break; temp = (int) ch; fout << char(temp+KEY); array[count] = char(temp+KEY); count++; }while(true); cout << endl; for(int j=0;j #include using namespace std; const int KEY = 156; void main() { ifstream fin ("source1.txt"); ofstream fout ("source1_enc.txt"); int temp; char ch; cout << "원본값 : "; int count = 0; do{ fin.get(ch); if (fin.eof()) break; fout << char((ch+KEY)%256); cout << char((ch+KEY)%256); count++; }while(true); cout << endl; } }}} ---- [암호화실습], [데블스캠프2004/목요일]