diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/utils/CryptoHelper.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/CryptoHelper.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/CryptoHelper.java b/src/main/java/de/pixart/messenger/utils/CryptoHelper.java index b5d3d6c61..06fda4163 100644 --- a/src/main/java/de/pixart/messenger/utils/CryptoHelper.java +++ b/src/main/java/de/pixart/messenger/utils/CryptoHelper.java @@ -243,4 +243,12 @@ public final class CryptoHelper { return url; } } + + public static boolean isPgpEncryptedUrl(String url) { + if (url == null) { + return false; + } + final String u = url.toLowerCase(); + return !u.contains(" ") && (u.startsWith("https://") || u.startsWith("http://")) && u.endsWith(".pgp"); + } } |