Improve SignalServiceAddress handling

This commit is contained in:
AsamK 2019-12-30 16:06:16 +01:00
parent 4ca3fe87f4
commit 6cfddc0aff
8 changed files with 101 additions and 60 deletions

View file

@ -257,6 +257,8 @@ class Utils {
}
static String computeSafetyNumber(String ownUsername, IdentityKey ownIdentityKey, String theirUsername, IdentityKey theirIdentityKey) {
// Version 1: E164 user
// Version 2: UUID user
Fingerprint fingerprint = new NumericFingerprintGenerator(5200).createFor(1, ownUsername.getBytes(), ownIdentityKey, theirUsername.getBytes(), theirIdentityKey);
return fingerprint.getDisplayableFingerprint().getDisplayText();
}