diff options
author | Kenny Root <kenny@the-b.org> | 2011-10-15 11:29:17 -0700 |
---|---|---|
committer | Kenny Root <kenny@the-b.org> | 2011-10-15 11:29:17 -0700 |
commit | 629f7d6eefd67c3d8a59f5ec0cfc17b823dcd6c3 (patch) | |
tree | e594aa153bf3ae8fbd60d59e849e228ecf38c578 /src | |
parent | a7d16b81f466c32f549f2638f61d9376c65db47f (diff) | |
download | connectbot-629f7d6eefd67c3d8a59f5ec0cfc17b823dcd6c3.tar.gz connectbot-629f7d6eefd67c3d8a59f5ec0cfc17b823dcd6c3.tar.bz2 connectbot-629f7d6eefd67c3d8a59f5ec0cfc17b823dcd6c3.zip |
Add some test coverage for PubkeyUtils
Diffstat (limited to 'src')
-rw-r--r-- | src/org/connectbot/util/PubkeyUtils.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/org/connectbot/util/PubkeyUtils.java b/src/org/connectbot/util/PubkeyUtils.java index db884d2..e10ee20 100644 --- a/src/org/connectbot/util/PubkeyUtils.java +++ b/src/org/connectbot/util/PubkeyUtils.java @@ -338,17 +338,17 @@ public class PubkeyUtils { return sb.toString(); } - final static private char hexDigit[] = { '0', '1', '2', '3', '4', '5', '6', + private static final char[] HEX_DIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; - private static String encodeHex(byte[] bytes) { - char[] hex = new char[bytes.length * 2]; + protected static String encodeHex(byte[] bytes) { + final char[] hex = new char[bytes.length * 2]; int i = 0; for (byte b : bytes) { - hex[i++] = hexDigit[(b >> 4) & 0x0f]; - hex[i++] = hexDigit[b & 0x0f]; + hex[i++] = HEX_DIGITS[(b >> 4) & 0x0f]; + hex[i++] = HEX_DIGITS[b & 0x0f]; } - return new String(hex); + return String.valueOf(hex); } } |