An unoptimized translation of the blake3 reference implementation from rust to java.
<dependency>
<groupId>io.github.rctcwyvrn</groupId>
<artifactId>blake3</artifactId>
<version>1.3</version>
</dependency>
// Hashing bytes
Blake3 hasher = Blake3.newInstance();
hasher.update("This is a string".getBytes());
String hexhash = hasher.hexdigest();
// Hashing files
Blake3 hasher = Blake3.newInstance();
hasher.update(new File(filename));
String filehash = hasher.hexdigest();
If what you want are java bindings for the fully optimized blake3, try: https://github.com/sken77/BLAKE3jni