diff --git a/java/srcPubnubApi/com/pubnub/api/PubnubCryptoCore.java b/java/srcPubnubApi/com/pubnub/api/PubnubCryptoCore.java index 81ac22af5..c40683103 100644 --- a/java/srcPubnubApi/com/pubnub/api/PubnubCryptoCore.java +++ b/java/srcPubnubApi/com/pubnub/api/PubnubCryptoCore.java @@ -93,7 +93,7 @@ public String encrypt(String input) throws DataLengthException, */ public String decrypt(String cipher_text) throws DataLengthException, IllegalStateException, InvalidCipherTextException, IOException, IllegalArgumentException { - cipher_text = cipher_text.replace("\n", ""); + cipher_text ="\n" + cipher_text; byte[] cipher = Base64Encoder.decode(cipher_text); InputStream st = new ByteArrayInputStream(cipher); ByteArrayOutputStream ou = new ByteArrayOutputStream();