From: couturie Date: Sat, 14 Apr 2018 15:08:49 +0000 (+0200) Subject: first version of cipher_jpg X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/commitdiff_plain/f49f8917e590f55bb5f21c8220ff517c19588aa6?ds=inline;hp=--cc first version of cipher_jpg --- f49f8917e590f55bb5f21c8220ff517c19588aa6 diff --git a/CipherImg/cipher_jpg.cpp b/CipherImg/cipher_jpg.cpp new file mode 100644 index 0000000..ccd9f8c --- /dev/null +++ b/CipherImg/cipher_jpg.cpp @@ -0,0 +1,106 @@ +//g++ cipher_jpg.cpp -o cipher_jpg -O3 + +//cipher_jpg ~/Pictures/ecuador\ 2013/IMG_7548.JPG 38762 +//usage cipher_jpg image seed + +#include +#include +#include +#include + + +using namespace std; + +typedef unsigned char uchar; + +uchar modulo(int x,int N){ return (x % N + N) %N; } + +void fxor(uchar *buf,int sz, int seed,int enc) { + int start,end; + + for(int i=1;i=end) + cout<<"pb"<=end) + cout<<"pb"<0;a--) { Z[a-1]=Z[a]^Y[a]; } - for(int a=0;a