Skip to content

Commit 6413ce7

Browse files
committed
Fixed an issue with spaces being removed from the JSON content to encrypt
1 parent 827674b commit 6413ce7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/com/mastercard/developer/encryption/FieldLevelEncryption.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,7 @@ private static byte[] sha256digestBytes(byte[] bytes) throws GeneralSecurityExce
377377
private static String sanitizeJson(String json) {
378378
return json.replaceAll("\n", "")
379379
.replaceAll("\r", "")
380-
.replaceAll("\t", "")
381-
.replaceAll(" ", "");
380+
.replaceAll("\t", "");
382381
}
383382

384383
private static String encodeBytes(byte[] bytes, FieldValueEncoding encoding) {

0 commit comments

Comments
 (0)