Sha256 is not reversible, it's a hash (like MD5), 

you cannot get original password by reversing sha256 hashed passwords.

Shiro does not decrypt password at the time of authentication, it just
compares hash of password provided by user with the hash of password stored
in db,

 

 

Sudhir N

[Independent Grails/Java developer]

 

From: Nagaraju Kurma [mailto:[email protected]] 
Sent: Friday, August 09, 2013 6:21 PM
To: [email protected]
Subject: how to decrypt the SHA-256 encryption password

 

i am using the password encryption technique SHA-256 which is built in for
the Apache shiro API

 

configuration:

 

in spring context xml file

---------------------------------

 

<bean class="org.apache.shiro.authc.credential.HashedCredentialsMatcher">

                                                <property
name="hashAlgorithmName" value="SHA-256" />

                                                <property
name="storedCredentialsHexEncoded" value="false" />

</bean>

 

while storing encrypted password in database

---------------------------------------------------------

 

user.setPassword(new Sha256Hash("password", user.getUsername().trim())

                                                .toBase64());

 

 

as we know that shiro internally does password decryption and authenticates
the logging user, but now i am having the requirement to decrypt the
password manually at out side.

 

 

please can anybody suggest how to decrypt  or can anybody share the
decryption utility code.

 

 

thanks in advance..... :)

 

 

 

-- 

Regards,

Nagaraju.

Reply via email to