> Hello, coudl some one teaches me how to encrypt a string and then decrypt
> the same string?
> I used java.security.* class, and I used messageDigest(MD5)
> alogrithem....the string is now encrypted...but how do I decrypt
> please help..... links to other tutorial sites will be also helpful.
As I understand it, the purpose of a message digest is not to
encrypt/decrypt but to prevent undetectable tampering. It acts as a check
sum of the message and is usually much smaller than the message itself and
so cannot be reversed (i.e. there is no undigest function).
How to encrypt depends on how secure you want or need the information to
be, something as simple as moving on every character by an arbitrary
amount might be OK for minimum security, while a book like
"Applied Cryptography" by Bruce Schneider (Wiley) is essential reading for
taking on the securty services.