I am encoding NSString input using the following code (CC_SHA256). Could someone help me retrieving in decoded format using the same logic?
-(NSString*) enco
As the others have noted, SHA-1 and the SHA-2 variants are by design one-way hashes. If you can reverse them, the hashes are broken. The hashes are designed to check data integrity, not to provide data encryption.
If you want encryption/decryption as opposed to hashing, you want to use one of CommonCrypto's CCCryptor
routines. See:
Any cocoa source code for AES encryption decryption?
You can't SHA is a hashing algoritm, not ment to be decoded.
Like Jonathan Grynspan said, if you could decode sha (any version) would defeat the purpose of such an algorithm.