peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
In my application, at the User registration time, i need to Encrypt the password field and then i like to store into the database.
After that the same user will be logging, at the moment the database password will decrypt and it will be compare to the User entering password.
Just highlighed the keywords you used it. I'm not into encryption/decryption but as Java reference state Message digests are secure one-way hash functions that take arbitrary-sized data and output a fixed-length hash value. . So you can only encrypt, no reverse process. However there is no need for decryption as MessageDigest class provide public static boolean isEqual(byte[] digesta, byte[] digestb) .Compares two digests for equality. Does a simple byte compare.
In login process take user entered password, encrypt it and compare with data from database. Problem solved...
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
any one plz give source code in java for
encrypted and decrypted password
first of all, if you have a question, create a new thread instead of reviving a year old one.
secondly, the answer is no. maybe we can, but we won't.
you wouldn't be learning anything. just read the answers earlier given in this thread, or go ask Google, you might be surprised what difference a bit of effort can make, but do not expect us to:
a. do your homework
b. do your job
without any effort from your side.
stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
please give me the executable complete code for encryption and also decryption of a file.
nope ...
stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433