By looking around here as well as the internet in general, I have found Bouncy Castle. I want to use Bouncy Castle (or some other freely available utility) to generate a SHA-256 Hash of a String in Java. Looking at their documentation I can’t seem to find any good examples of what I want to do. Can anybody here help me out?
Share
To hash a string, use the built-in MessageDigest class:
In the snippet above,
digestcontains the hashed string andhexcontains a hexadecimal ASCII string with left zero padding.