commit | b215bfd8f7f0b35b97ee23b30045ccf87d3d2298 | [log] [tgz] |
---|---|---|
author | Stuart McCulloch <mcculls@apache.org> | Thu Sep 06 18:28:06 2012 +0000 |
committer | Stuart McCulloch <mcculls@apache.org> | Thu Sep 06 18:28:06 2012 +0000 |
tree | 0f50160b79353d0c44a676c0b081704b64529dfb | |
parent | 6bc213709e22c285ba94a20415310657a44847e0 [diff] [blame] |
Sync bndlib code git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1381708 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/aQute/libg/cryptography/Digester.java b/bundleplugin/src/main/java/aQute/libg/cryptography/Digester.java index 2785c3d..2722ab1 100644 --- a/bundleplugin/src/main/java/aQute/libg/cryptography/Digester.java +++ b/bundleplugin/src/main/java/aQute/libg/cryptography/Digester.java
@@ -48,4 +48,13 @@ public abstract T digest(byte[] bytes) throws Exception; public abstract String getAlgorithm(); + + public T from(File f) throws Exception { + IO.copy(f, this); + return digest(); + } + public T from(byte[] f) throws Exception { + IO.copy(f, this); + return digest(); + } }