Mercurial > 510Connectbot
comparison 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 |
comparison
equal
deleted
inserted
replaced
374:597138203c15 | 375:8c1451f51a5e |
---|---|
16 public final class MAC { | 16 public final class MAC { |
17 private Digest mac; | 17 private Digest mac; |
18 private int size; | 18 private int size; |
19 | 19 |
20 public static String[] getMacList() { | 20 public static String[] getMacList() { |
21 // Higher priority first. Added SHA-2 algorithms as in RFC 6668 | 21 // Higher priority (stronger) first. Added SHA-2 algorithms as in RFC 6668 |
22 return new String[] {"hmac-sha1-96", "hmac-sha1", "hmac-md5-96", "hmac-md5", "hmac-sha2-256", "hmac-sha2-512"}; | 22 return new String[] { |
23 "hmac-sha2-512", | |
24 "hmac-sha2-256", | |
25 "hmac-sha1", | |
26 "hmac-sha1-96", | |
27 "hmac-md5", | |
28 "hmac-md5-96" | |
29 }; | |
23 } | 30 } |
24 | 31 |
25 public static void checkMacList(final String[] macs) { | 32 public static void checkMacList(final String[] macs) { |
26 for (String m : macs) { | 33 for (String m : macs) { |
27 getKeyLen(m); | 34 getKeyLen(m); |