I have a database with a password field, which has a kind of "encryption".
Analyzing the logic: I created users in the system and put the password: 123. When I went to check the password in the bank it was: 032.
If we go for logical reasoning, when I put 1, it generated 0 (a value below); when I put 2, it generated 3 (one value up) and then 3, it generated 2 (one value below).
Other examples:
SENHA RESULTADO NO BANCO
abcdefghijklmnopqrstuvwxyz 'cbedgfihkjmlonqpsrutwvyx{
ABCDEFGHIJKLMNOPQRSTUVWXYZ @CBEDGFIHKJMLONQPSRUTWVYX[
0123456789 1032547698
(reading the password it replaces each position with a value above and below).
How can I generate this logic in Java?