# [ACCEPTED]-encrypt- decrypt with SHA256 using java-hash

The **S***ecure* **H***ash* **A***lgorithm* family of functions are *one-way* functions. You 4 can use the functions to get a cryptographic 3 hash from any given input, but it is impossible 2 to reverse the function and arrive at the 1 input from any given output hash.

I think you're confused about what SHA is. SHA 4 is a Cryptographic Hash Function, not an encryption algorithm. You 3 can't reverse the operation to determine 2 the message that was used to generate a 1 particular hash.

There have actually been several techniques 8 proposed for turning hash functions into 7 block ciphers that can encrypt and decrypt 6 - for example Peter Gutmann's "Message 5 Digest Cipher".

This paper has some cryptanalysis 4 of some of these techniques.

But you *really* don't 3 want to do this - you are far better off 2 using a well-studied block cipher, like 1 AES.

SHA-256 is a one way algorithm, it cannot 1 be decrypted!

More Related questions

We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.