@Test public void testEmptyFileSHA1() throws IOException { String filePath = getClass().getResource(EMPTY_FILE_TXT).getFile(); File file = new File(URLDecoder.decode(filePath, UTF_8)); String sha1 = ChecksumUtils.calculateSHA1(file); Assert.assertEquals(EMPTY_FILE_SHA1, sha1); }
public static String calculateSHA1(File resourceFile) throws IOException { return calculateHash(resourceFile, HashAlgorithm.SHA1); }
ChecksumUtils { public static String calculateSHA1(File resourceFile) throws IOException { return calculateHash(resourceFile, HashAlgorithm.SHA1); } }
ChecksumUtils { public static String calculateSHA1(File resourceFile) throws IOException { return calculateHash(resourceFile, HashAlgorithm.SHA1); } private  ChecksumUtils(); }
ChecksumUtils { public static String calculateSHA1(File resourceFile) throws IOException { return calculateHash(resourceFile, HashAlgorithm.SHA1); } private  ChecksumUtils(); static String calculateSHA1(File resourceFile); static String calculateHash(File resourceFile, HashAlgorithm algorithm); static void calculateHeaderAndFooterSha1(File file, DependencyInfo dependencyInfo); static void calculateSuperHash(DependencyInfo dependencyInfo, File dependencyFile); static String calculateOtherPlatformSha1(File file); static void calculateOtherPlatformSha1(DependencyInfo dependency, File file); }
ChecksumUtils { public static String calculateSHA1(File resourceFile) throws IOException { return calculateHash(resourceFile, HashAlgorithm.SHA1); } private  ChecksumUtils(); static String calculateSHA1(File resourceFile); static String calculateHash(File resourceFile, HashAlgorithm algorithm); static void calculateHeaderAndFooterSha1(File file, DependencyInfo dependencyInfo); static void calculateSuperHash(DependencyInfo dependencyInfo, File dependencyFile); static String calculateOtherPlatformSha1(File file); static void calculateOtherPlatformSha1(DependencyInfo dependency, File file);  }