Implement listIdentities and trust commands

Print the fingerprints of all known phone numbers and can set their trust
This commit is contained in:
AsamK 2016-07-14 15:35:59 +02:00
parent bfb51e414b
commit f095d947f8
5 changed files with 156 additions and 2 deletions

View file

@ -19,4 +19,13 @@ public class Hex {
buf.append(HEX_DIGITS[b & 0xf]);
buf.append(" ");
}
public static byte[] toByteArray(String s) {
int len = s.length();
byte[] data = new byte[len / 2];
for (int i = 0; i < len; i += 2) {
data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) + Character.digit(s.charAt(i + 1), 16));
}
return data;
}
}