I\'m looking for a strong hash function (algorithm) to hash my codes. i want to restore hashed string to original string.
(can i restore sha
to ori
You can't restore the original data from a hash as it is not reversible by design. An usual explanation is the Pigeonhole Principle - most hashes are about 128-256 bits, so 16-32 bytes in size. As soon as your string is longer (and even before this) than this, there will be two strings that have the same hash. This is called a collision.
Also note that strings shorter than 16-32 bytes can often be reversed, although you shouldn't rely on this as there can be collisions, too. For example, hash some string like test
and search for the hash on Google.
Nevertheless, even test
and some other short word could have the same hash, so you'll never be 100% sure you've got the right string.