decrypt with commons codec library

0

In a method of creating I am encrypting a password and saving it in a database, now in a validation method I get that string but I do not know how to decrypt it. I'm using the commons codec library of apache. How do I do it? in this way the encrypted

String clave = DigestUtils.sha1Hex(pass);

in this way I opted for the bd

while (rs.next()) {
                passw = (rs.getString("Pass"));

            }
    
asked by Jeferson Martinez 08.11.2017 в 15:01
source

1 answer

0

Well after a lot of research it turns out that El sha1 is not to encrypt decipher, but to create footprint, it is one way.

the result of sha1 is saved, and to verify the pass it has to be passed again with Sha1, if it is equal to the one stored in the bd, the password is correct.

    
answered by 14.11.2017 в 23:32