aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/utils/CryptoHelper.java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-11-24 21:03:21 +0100
committerChristian Schneppe <christian@pix-art.de>2016-11-24 21:03:21 +0100
commitdfaf8f40c59eb27d4f4e67aabb04b64ff7b043be (patch)
treed3aa93dc40a0036e0536af218c8821553f9c13c2 /src/main/java/de/pixart/messenger/utils/CryptoHelper.java
parent5d4d04b2a448b594ebb1f75ee80e8bcf90762cf1 (diff)
added share button to account details
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/utils/CryptoHelper.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/CryptoHelper.java b/src/main/java/de/pixart/messenger/utils/CryptoHelper.java
index ec4f750fd..da9007a06 100644
--- a/src/main/java/de/pixart/messenger/utils/CryptoHelper.java
+++ b/src/main/java/de/pixart/messenger/utils/CryptoHelper.java
@@ -206,9 +206,13 @@ public final class CryptoHelper {
}
public static String getAccountFingerprint(Account account) {
+ return getFingerprint(account.getJid().toBareJid().toString());
+ }
+
+ public static String getFingerprint(String value) {
try {
MessageDigest md = MessageDigest.getInstance("SHA-256");
- return bytesToHex(md.digest(account.getJid().toBareJid().toString().getBytes("UTF-8")));
+ return bytesToHex(md.digest(value.getBytes("UTF-8")));
} catch (Exception e) {
return "";
}