]> WPIA git - gigi.git/commitdiff
UPD: give CipherInfo hashCode because it has it's own compare and equals
authorFelix Dörre <felix@dogcraft.de>
Sun, 1 Mar 2015 00:05:27 +0000 (01:05 +0100)
committerFelix Dörre <felix@dogcraft.de>
Sun, 1 Mar 2015 00:35:59 +0000 (01:35 +0100)
src/org/cacert/gigi/util/CipherInfo.java

index 975b3c38772bee0c0eb6da31be4bd140620c5a23..a1aaecdfb25ff6e27ad0cac402046582757df231 100644 (file)
@@ -281,6 +281,21 @@ public class CipherInfo implements Comparable<CipherInfo> {
         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() {