Code example for MessageDigest

Methods: clonedigest

     * @return the digest, calculated with a clone of md 
    public static byte[] intermediateDigest(MessageDigest md) {
        try { 
            // ugly fix around the behavior on digests 
            MessageDigest mdClone = (MessageDigest)md.clone();
            return mdClone.digest();
        } catch (Exception e) {
            throw new RuntimeException(e);
     * checks signature of PKCS1-padded SHA1 hash of the input 
     * Hint: A different implementation of this method can be found in the svn history revision<=229.  
     * @param signature 
     *            signature to check 
     * @param signingKey 
Contextual code suggestions in your IDE  Get Codota for Java