aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/omemo/src/ui')
-rw-r--r--plugins/omemo/src/ui/util.vala6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/omemo/src/ui/util.vala b/plugins/omemo/src/ui/util.vala
index 88d30b3b..cf61ed82 100644
--- a/plugins/omemo/src/ui/util.vala
+++ b/plugins/omemo/src/ui/util.vala
@@ -1,3 +1,5 @@
+using Xmpp.Util;
+
namespace Dino.Plugins.Omemo {
public static string fingerprint_from_base64(string b64) {
@@ -19,7 +21,7 @@ public static string fingerprint_markup(string s) {
for (int i = 0; i < s.length; i += 4) {
string four_chars = s.substring(i, 4).down();
- int raw = (int) four_chars.to_long(null, 16);
+ int raw = (int) from_hex(four_chars);
uint8[] bytes = {(uint8) ((raw >> 8) & 0xff - 128), (uint8) (raw & 0xff - 128)};
Checksum checksum = new Checksum(ChecksumType.SHA1);
@@ -57,4 +59,4 @@ public static string fingerprint_markup(string s) {
return "<span font_family='monospace' font='8'>" + markup + "</span>";
}
-} \ No newline at end of file
+}