aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/utils/CryptoHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/utils/CryptoHelper.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/utils/CryptoHelper.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/utils/CryptoHelper.java b/src/main/java/de/thedevstack/conversationsplus/utils/CryptoHelper.java
index 115ac190..9599aa37 100644
--- a/src/main/java/de/thedevstack/conversationsplus/utils/CryptoHelper.java
+++ b/src/main/java/de/thedevstack/conversationsplus/utils/CryptoHelper.java
@@ -91,6 +91,11 @@ public final class CryptoHelper {
}
public static String prettifyFingerprint(String fingerprint) {
+ if (fingerprint==null) {
+ return "";
+ } else if (fingerprint.length() < 40) {
+ return fingerprint;
+ }
StringBuilder builder = new StringBuilder(fingerprint);
builder.insert(8, " ");
builder.insert(17, " ");