Using sha256.js plugin I can encode string but how to do the reverse process on client side.I want to decode sha256 encoded string using javascript or jquery plugin or npm package in angular 2/4
Using sha256.js plugin I can encode string but how to do the reverse process on client side.I want to decode sha256 encoded string using javascript or jquery plugin or npm package in angular 2/4
Share Improve this question edited Jun 7, 2018 at 11:52 Capricorn 2,0895 gold badges24 silver badges31 bronze badges asked Jun 7, 2018 at 9:32 DeveloperDeveloper 111 gold badge1 silver badge2 bronze badges 5- 1 SHA256 is a hashing algorthm. It cannot be decrypted - that's the point. – Rory McCrossan Commented Jun 7, 2018 at 9:36
- @RoryMcCrossan thanks for the suggestion. can you please tell me that how to decrypt sha256 hash encoded string using crypto js? – Developer Commented Jun 7, 2018 at 9:37
- You can't - as I mentioned above SHA256 is for hashing, not encrypting – Rory McCrossan Commented Jun 7, 2018 at 9:40
- @Developer, SHA256 is a one side encryption. – nandal Commented Jun 7, 2018 at 9:44
- @Developer, as Rory said SHA256 is hashing algorithm, you cannot reverse it, but the idea if you want to match some string with a SHA256 script you just need to apply the hash on the string you have and then pare the two outputs (As result of hashing is always the same) – Mohamed23gharbi Commented Jun 7, 2018 at 9:50
1 Answer
Reset to default 6You can't decode hash but pare with another string hashed. You need an encrypted way like AES, RSA, etc. not hash