How to encrypt and decrypt a char? | Sololearn: Learn to code for FREE!


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/22/2017 10:39:35 AM


1 Answer

New Answer


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'