I'm trying to use the Jacksum API to generate a Whirlpool hash, but I'm getting a NoSuchAlgorithmException:
import java.security.NoSuchAlgorithmException;
import jonelo.jacksum.JacksumAPI;
import jonelo.jacksum.algorithm.AbstractChecksum;
public static String genHash(String inText) {
AbstractChecksum checksum = null;
checksum = JacksumAPI.getChecksumInstance("whirlpool");
checksum.update(inText.getBytes());
return checksum.getFormattedValue();
}
I tried other popular algorithms (sha256, md5) and they all apparently "aren't such".
./libsdpg.java:27: error: unreported exception NoSuchAlgorithmException; must be caught or declared to be thrown
checksum = JacksumAPI.getChecksumInstance("whirlpool");
^
1 error
EDIT: I added the try-catch, and now it's actually getting the error.