/** * Creates SHA-512 digest of a file. * * @param file {@link File} to create digest of. * @return SHA-512 digest of the {@link File}. */ public static String sha512(final File file) throws IOException { return DigestEngine.sha512().digestString(file); }
@Test void testSha512() { assertEquals("ACF65B0C3DE891B2984F461FA12EF4DD205B2DE360F3C834A47368CBDD334687AB5E8405AA910DF8AC6B5631BF1F2CC5133B0D95493A40452EC5B984E4FC31E8", DigestEngine.sha512().digestString("Jodd")); }
/** * Creates SHA-512 digest of a file. * * @param file {@link File} to create digest of. * @return SHA-512 digest of the {@link File}. */ public static String sha512(final File file) throws IOException { return DigestEngine.sha512().digestString(file); }