SHA is not a cipher -which is used for reversible (or two-way) encryption-, it's a hash or digest, and is used for irreversible, or one-way, encryption. If you ever want to get back the original cleartext then you need to use a cipher such as Triple-DES or AES. The Java API for that is called JCE; you'll find more details and examples in the SecurityFaq.
I know sha is a 1 way hash function.but, i need to show it step by step on how to encrypt the data using sha algorithm.
can someone help me??please please please
"java dummy", please understand that it is mandatory to follow the instructions of the private message which I sent to you.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35224
7
posted
0
Start with the "How do I work with message digests?" article in the FAQ page I mentioned. Note that one shouldn't use SHA-1 any more, but SHA-2 instead (in the shape of SHA-256, SHA-384 or SHA-512).