diff src/ch/ethz/ssh2/crypto/digest/MAC.java @ 375:8c1451f51a5e

kex error fixed; order encryption, hash, and kex algorithms properly, strongest preferred
author Carl Byington <carl@five-ten-sg.com>
date Mon, 04 Aug 2014 14:21:32 -0700
parents 071eccdff8ea
children 4226f87534f4
line wrap: on
line diff
--- a/src/ch/ethz/ssh2/crypto/digest/MAC.java	Mon Aug 04 14:02:00 2014 -0700
+++ b/src/ch/ethz/ssh2/crypto/digest/MAC.java	Mon Aug 04 14:21:32 2014 -0700
@@ -18,8 +18,15 @@
     private int size;
 
     public static String[] getMacList() {
-        // Higher priority first. Added SHA-2 algorithms as in RFC 6668
-        return new String[] {"hmac-sha1-96", "hmac-sha1", "hmac-md5-96", "hmac-md5", "hmac-sha2-256", "hmac-sha2-512"};
+        // Higher priority (stronger) first. Added SHA-2 algorithms as in RFC 6668
+        return new String[] {
+                             "hmac-sha2-512",
+                             "hmac-sha2-256",
+                             "hmac-sha1",
+                             "hmac-sha1-96",
+                             "hmac-md5",
+                             "hmac-md5-96"
+                             };
     }
 
     public static void checkMacList(final String[] macs) {