public static MessageDigest getDigestInstance(String algorithm, String provider)
                throws NoSuchProviderException, NoSuchAlgorithmException {
            if (provider != null) {
                try {
                    return MessageDigest.getInstance(algorithm, provider);
                } catch (NoSuchAlgorithmException e) {
                    return MessageDigest.getInstance(algorithm); // try rolling back
                }
            } else {
                return MessageDigest.getInstance(algorithm);
            }
        }
Tika parser for Time Stamped Data Envelope (application/timestamped-data)
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-crypto-module/src/main/java/org/apache/tika/parser/crypto/TSDParser.java