diff --git a/UWPX_UI/Controls/Settings/AccountOmemoInfoControl.xaml b/UWPX_UI/Controls/Settings/AccountOmemoInfoControl.xaml index e7c10c880..099129b5b 100644 --- a/UWPX_UI/Controls/Settings/AccountOmemoInfoControl.xaml +++ b/UWPX_UI/Controls/Settings/AccountOmemoInfoControl.xaml @@ -14,7 +14,9 @@ - + + /// + /// + /// + /// + /// + public static string genOmemoQrCodeFingerprint(IdentityKey key, XMPPAccount account) + { + StringBuilder sb = new StringBuilder("xmpp:"); + sb.Append(account.getIdAndDomain()); + sb.Append("?omemo-sid-"); + sb.Append(account.omemoDeviceId); + sb.Append('='); + sb.Append(byteArrayToHexString(key.serialize())); + return sb.ToString(); + } + public static void nextBytesSecureRandom(out byte[] b, in uint length) { IBuffer buf = CryptographicBuffer.GenerateRandom(length);