Should XOR operation performed on binary images only?
10 ビュー (過去 30 日間)
古いコメントを表示
I want to perform XOR encryption and decryption on images.Should this operation performed on binary images only?
0 件のコメント
回答 (2 件)
Guillaume
2015 年 6 月 5 日
編集済み: Guillaume
2015 年 6 月 5 日
I assume this question came to be because you looked at the doc of xor in matlab and saw that it only applied to logical (binary / boolean) values. That's because xor is a logical operator.
It would be a bit pointless to have to binarise an image to be able to encrypt it. It certainly wouldn't be reversible anyway.
What you are looking for is the bit-wise xor, bitxor which can xor two integer bit xoring their corresponding bits.
encimage = bitxor(rawimage, somevalue)
%or
encimage = bitxor(rawimage, someotherimagethesamesize)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Encryption / Cryptography についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!