Clear Filters
Clear Filters

Opposite operation of XOR

51 views (last 30 days)
Alina
Alina on 7 Mar 2014
Commented: Guillaume on 19 Oct 2018
a='01101010'
key='10010010'
Cipher=xor(a,key)= 11111000
now how to get 'a' back if i have key & Cipher?
  2 Comments
aaru sri
aaru sri on 19 Oct 2018
wht func is used as a reverse of bitxor
Guillaume
Guillaume on 19 Oct 2018
wht func is used as a reverse of bitxor
The reverse of any xor operation is itself, so the reverse of bitxor is bitxor. This is a fundamental property of xor, applying it twice gets you back where you started.

Sign in to comment.

Answers (1)

James Tursa
James Tursa on 7 Mar 2014
a = xor(Cipher,key)

Categories

Find more on Characters and Strings in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!