@Test public void testGetHexDigest() throws FileNotFoundException, URISyntaxException, IOException, NoSuchAlgorithmException { boolean dataTested = false; for (File file : AllCoreTest .getFilesFromResourceDir(AllCoreTest.TEST_DATA_ROOT)) { JavaDigestValue apacheValue = JavaDigestValue.getInstance( DigestAlgorithm.MD5, DigestUtils.md5(new FileInputStream(file))); JavaDigestValue testValue = JavaDigestValue.getInstance( DigestAlgorithm.MD5, file); JavaDigestValue testSha1Value = JavaDigestValue.getInstance( DigestAlgorithm.SHA1, file); assertEquals( "apacheValue.hexDigest() and testValue.hexDigest() should be equal", apacheValue.getHexDigest(), testValue.getHexDigest()); assertFalse( "apacheValue.hexDigest() and testSha1Value.hexDigest() shouldn't be equal", apacheValue.getHexDigest().equals( testSha1Value.getHexDigest())); dataTested = true; } assertTrue("No data tested as flag no set", dataTested); }
@Override public String getHexDigest() { return this.hexDigest; }
JavaDigestValue implements DigestValue, Serializable { @Override public String getHexDigest() { return this.hexDigest; } }
JavaDigestValue implements DigestValue, Serializable { @Override public String getHexDigest() { return this.hexDigest; } JavaDigestValue();   JavaDigestValue(DigestAlgorithm algorithm, String hexDigest);   JavaDigestValue(DigestAlgorithm algorithm, byte[] digest); }
JavaDigestValue implements DigestValue, Serializable { @Override public String getHexDigest() { return this.hexDigest; } JavaDigestValue();   JavaDigestValue(DigestAlgorithm algorithm, String hexDigest);   JavaDigestValue(DigestAlgorithm algorithm, byte[] digest); @Override URI getAlgorithmId(); @Override String getHexDigest(); @Override byte[] getDigest(); String toXml(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); static JavaDigestValue getInstance(String xml); static JavaDigestValue getInstance(DigestAlgorithm algorithm,
			byte[] digest); static JavaDigestValue getInstance(DigestAlgorithm algorithm,
			String hexDigest); static JavaDigestValue getInstance(DigestAlgorithm algorithm,
			InputStream byteStream); static JavaDigestValue getInstance(DigestAlgorithm algorithm,
			File file); static Set<JavaDigestValue> createDigestSet(
			Set<DigestAlgorithm> algorithms, InputStream is); }
JavaDigestValue implements DigestValue, Serializable { @Override public String getHexDigest() { return this.hexDigest; } JavaDigestValue();   JavaDigestValue(DigestAlgorithm algorithm, String hexDigest);   JavaDigestValue(DigestAlgorithm algorithm, byte[] digest); @Override URI getAlgorithmId(); @Override String getHexDigest(); @Override byte[] getDigest(); String toXml(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); static JavaDigestValue getInstance(String xml); static JavaDigestValue getInstance(DigestAlgorithm algorithm,
			byte[] digest); static JavaDigestValue getInstance(DigestAlgorithm algorithm,
			String hexDigest); static JavaDigestValue getInstance(DigestAlgorithm algorithm,
			InputStream byteStream); static JavaDigestValue getInstance(DigestAlgorithm algorithm,
			File file); static Set<JavaDigestValue> createDigestSet(
			Set<DigestAlgorithm> algorithms, InputStream is);  }