STEG - steg.cc
Cerca
 











steg.cc

Caricato da: Matthew
Scarica il programma completo

/* Copyrigth 2010 Matteo Sesia This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include #include #include #include #include using namespace std; int datastart, N; void swap(int *a, int *b) { int *temp = a; a=b; b=temp; } void setPixel(int* bmp, int pixel, int R, int G, int B) { bmp[datastart+pixel*3]=R; bmp[datastart+pixel*3+1]=G; bmp[datastart+pixel*3+2]=B; } void hideChar(int* bmp, int *pixel, int k, char c) { int n = (int)c; int nn[3]; vector a; nn[0] = c%10; nn[1] = (n/10)%10; nn[2] = (n/100)%10; for(int i=0; i<3; i++) { int m = bmp[datastart+pixel[k+i]]/10; m*=10; m+=nn[i]; bmp[datastart+pixel[k+i]]=m; } } void hideString(int* bmp, string str, string key) { int S[N]; int j=0, k=0; for(int i=0; i=N/3) { cout<<"Cannot hide "<>key; cout<<"Encrypting message..."<
 

Creative Commons License
Il layout di questo sito è concesso sotto licenza Creative Commons.
Per maggiori informazioni sulle licenze dei contenuti del sito, clicca.