public static String createHash ( final File file , final String algorithm ) { checkNotNull ( "file" , file ) ; checkNotNull ( "algorithm" , algorithm ) ; try { try ( final FileInputStream in = new FileInputStream ( file ) ) { return createHash ( in , algorithm ) ; } } catch ( final IOException ex ) { throw new RuntimeException ( ex ) ; } }
Creates a HEX encoded hash from a file .