[Javadocs]
Java implementations of popular cryptographic hash functions
Digest digest = HashFunctions.sha256().hash("Hello, world!".getBytes());
String expectedDigest = "315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3";
assertEquals(expectedDigest, digest.hex());
assertTrue(digest.verify("Hello, world!".getBytes()));
assertFalse(digest.verify("another message".getBytes()));For more information, see the Javadocs.
The definitions of these hash functions are linked in HashFunctions.
- SHA-256 (256 bits; NIST)