- 1
How to encrypt and decrypt a char?
hello, i want to ask, in case if i have to encrypt a letter but it just encrypted a few char. ex : my name is d . and we have to replace the 'm' char with '?' so it turn to be: ?y na?e is d , can someone explain to me in java code? thank youu
1 Answer
+ 3
There are many ways of encryption: addition, subtraction, multiplication, division, compression ratio, the replacement... but the most effective and convenient continue operations, such as xor encryption. It is convenient to use: to encrypt a number (or symbol) need to use the xor operation on the number, and decrypt to use xor with this number again.
'a' xor 23 = 'v'
v' xor 23 = 'a'