Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 377
  • Last Modified:

password encryption and storing ...retrieving

Hi,

I need help regarding the password encryption and decryption.

Scenario: I need an encryption and decryption functions in such a  way that , when the user enters the password its first encrypted and then compared with the one stored in the database and validates. Now when the user forgets his password...he passes a request to retrieve it. Now when i try to take the encrypted password and decrypt, its not the same as the original string.

All this is when I use a java DES  encryption and decryption.

Any help in this regard is highly appreciated.

Thank You.
0
jagadeesh_motamarri
Asked:
jagadeesh_motamarri
  • 2
  • 2
  • 2
  • +1
1 Solution
 
jagadeesh_motamarriAuthor Commented:
I've checked that....but its the same thing....in a single instance when i run the encryption and decryption its gives me the ouput . But when i take the encrypted password and pass it to the decrytion function in the next run it does not give me the same original string.

Thank You.
0
 
CEHJCommented:
That's not a safe password policy. What you should do is store the one-way hash value of the password and then compare it with the one-way hash value of the value entered. Those with forgotten passwords should simply be given new ones and allowed to change them
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
jagadeesh_motamarriAuthor Commented:
seems to be good.....lemme try
0
 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
0
 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
0
 
CEHJCommented:
:-)
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now