Info
This question is closed. Reopen it to edit or answer.
image encryption using rc4 : error in bitxor
1 view (last 30 days)
Show older comments
Hello Community ,
i work now on rc4 image encryption algorithm but i am facing a little proplem
the image dimensions is 128 * 128 uint8
& the cipher generated by my algorithm is 1 * 128 uint 8
how to get the cipher to be generated in the same dimensions of input image
i will attach compressed file contains algorithm files
Hope you can help me, Thanks in Advance
Accepted Answer
Jan
on 16 Nov 2021
You instruct PRGA to reply 128 values:
Cipher = uint8(PRGA(KSA(key), size(original,2)));
I assume you want:
Cipher = uint8(PRGA(KSA(key), numel(original)));
3 Comments
Jan
on 16 Nov 2021
It does appear: Do you see the blue lines at x==0 and x==1? This seems to be a confusion between the double and UINT8 types. Cast the images as UINT8 before you forward it to the function to compute the histograms.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!