i algoritma VEA şifrelemek ve şifresini JSP.here algoritma Vea kullanılarak video akışı şifrelemek ve deşifre etmek istiyorum:
Algoritma VEA(
int m,/*key length*/
bit key[m], /*secret key*/
char *flv_video, /*input file*/
char *vea_flv_video) /*output file*/
int n; /*buffer size*/
bit video[n]; /*input buffer*/
file in; /*for input*/
file out; /*for output*/
int k,l,i = 0;
in = open(flv_video,“r“);
out = open(vea_flv_video,“w“);
while(!eof(in)){
l = read(video,n,in);
/*read l bits*/
for(k=0,k<l;k++){
switch(video[k]){
case(beginning of a GOP);
i=0;
/*resynchronization*/
break;
case():
video[k] = video[k] xor key[i];
i = ++i mod m;
} /*end switch*/
} /*end for*/
write(video,l,out);
} /*end while*/
close(in);
close(out);
}
/*end procedure*/