diff --git a/src/main/java/webhooks/core/services/util/CipherUtil.java b/src/main/java/webhooks/core/services/util/CipherUtil.java index 5fde515..5e09674 100644 --- a/src/main/java/webhooks/core/services/util/CipherUtil.java +++ b/src/main/java/webhooks/core/services/util/CipherUtil.java @@ -54,7 +54,7 @@ public static String encrypt(String str) { try { Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5PADDING"); cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "AES")); - final String encryptedString = Base64.encodeBase64String(cipher.doFinal(str.getBytes())); + final String encryptedString = Base64.encodeBase64URLSafeString(cipher.doFinal(str.getBytes())); return encryptedString; } catch (Exception ex) { Logger.getLogger(CipherUtil.class.getName()).log(Level.SEVERE, null, ex);