From: couturie Date: Sat, 14 Apr 2018 16:19:58 +0000 (+0200) Subject: first version cipher_h265 X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/commitdiff_plain/f78a79609363b2043b18146d6f1d100a5b8a7052?ds=sidebyside;hp=--cc first version cipher_h265 --- f78a79609363b2043b18146d6f1d100a5b8a7052 diff --git a/CipherVid/cipher_h265.cpp b/CipherVid/cipher_h265.cpp new file mode 100644 index 0000000..c1bf3b4 --- /dev/null +++ b/CipherVid/cipher_h265.cpp @@ -0,0 +1,157 @@ +//g++ cipher_h265.cpp -o cipher_h265 -O3 + +//example vid.h265 seed +//cipher_h265 vid1.h265 38762 + + +#include +#include +#include +#include + + +using namespace std; + +typedef unsigned char uchar; + +uchar modulo(int x,int N){ return (x % N + N) %N; } + + +void cipher_frame(uchar *buf, int start_sl, int end_sl, int enc) { + for(int i=0;i<(end_sl-start_sl)/2;i++) { + int p=lrand48()%(end_sl-start_sl)+start_sl; + if(p=end_sl) + cout<<"pb"<=end_sl) + cout<<"pb2"<