/** * After all the data has been added to the message digest via add methods, * this method is used to finalize the digest calcualation and return the digest as a String. You can get the * actual bytes of the digest if you call {@link #getDigest()} instead. * * @return the digest as a string */ public String getDigestString() { return calculateDigestStringFromBytes(getDigest()); }
public byte[] calcDigest(InputStream is) throws IOException { add(is); return getDigest(); }