Latest bnd code
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1350613 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/aQute/libg/cryptography/Digest.java b/bundleplugin/src/main/java/aQute/libg/cryptography/Digest.java
index 90e7b1a..93d48ad 100644
--- a/bundleplugin/src/main/java/aQute/libg/cryptography/Digest.java
+++ b/bundleplugin/src/main/java/aQute/libg/cryptography/Digest.java
@@ -10,30 +10,28 @@
protected Digest(byte[] checksum, int width) {
this.digest = checksum;
if (digest.length != width)
- throw new IllegalArgumentException("Invalid width for digest: " + digest.length
- + " expected " + width);
+ throw new IllegalArgumentException("Invalid width for digest: " + digest.length + " expected " + width);
}
-
public byte[] digest() {
return digest;
}
- @Override public String toString() {
+ @Override
+ public String toString() {
return String.format("%s(d=%s)", getAlgorithm(), Hex.toHexString(digest));
}
public abstract String getAlgorithm();
-
-
+
public boolean equals(Object other) {
- if ( !(other instanceof Digest))
+ if (!(other instanceof Digest))
return false;
Digest d = (Digest) other;
return Arrays.equals(d.digest, digest);
}
-
+
public int hashCode() {
return Arrays.hashCode(digest);
}