private static MessageDigest getMessageDigest ( String algorithm ) { try { return MessageDigest . getInstance ( algorithm ) ; } catch ( NoSuchAlgorithmException e ) { LOGGER . error ( e . getMessage ( ) ) ; final String msg = String . format ( "Failed to obtain the %s message digest." , algorithm ) ; throw new IllegalStateException ( msg , e ) ; } }
Returns the message digest .