From f78a79609363b2043b18146d6f1d100a5b8a7052 Mon Sep 17 00:00:00 2001 From: couturie Date: Sat, 14 Apr 2018 18:19:58 +0200 Subject: [PATCH 1/1] first version cipher_h265 --- CipherVid/cipher_h265.cpp | 157 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 CipherVid/cipher_h265.cpp 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"<