mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Implement listIdentities and trust commands
Print the fingerprints of all known phone numbers and can set their trust
This commit is contained in:
parent
bfb51e414b
commit
f095d947f8
5 changed files with 156 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue