]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/util/CipherInfo.java
add: Highlight certificates outside validity period in Cert Overview
[gigi.git] / src / org / cacert / gigi / util / CipherInfo.java
index 0160093401fd5c91dbcb14ba102dcb68d77dc0ca..7e5ecc17be58e676c66e37f81c5ec2b43fa1e176 100644 (file)
@@ -272,10 +272,35 @@ public class CipherInfo implements Comparable<CipherInfo> {
         return suiteName.compareTo(o.suiteName);
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (o instanceof CipherInfo) {
+            return 0 == this.compareTo((CipherInfo) o);
+        }
+
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((cipher == null) ? 0 : cipher.hashCode());
+        result = prime * result + ((cipherChaining == null) ? 0 : cipherChaining.hashCode());
+        result = prime * result + ((cipherPadding == null) ? 0 : cipherPadding.hashCode());
+        result = prime * result + ((keyExchange == null) ? 0 : keyExchange.hashCode());
+        result = prime * result + keySize;
+        result = prime * result + ((macName == null) ? 0 : macName.hashCode());
+        result = prime * result + macSize;
+        result = prime * result + ((suiteName == null) ? 0 : suiteName.hashCode());
+        return result;
+    }
+
     static String[] cipherRanking = null;
 
     public static String[] getCompleteRanking() {
         if (cipherRanking == null) {
+            @SuppressWarnings("unchecked")
             String[] ciphers = filterCiphers((Iterable<String>) cig.names.keySet());
             cipherRanking = ciphers;
         }