We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a32effb commit 54422deCopy full SHA for 54422de
src/main/java/com/mastercard/developer/utils/EncodingUtils.java
@@ -50,11 +50,14 @@ public static byte[] base64Decode(String value) {
50
if (null == value) {
51
throw new IllegalArgumentException("Can't base64 decode a null value!");
52
}
53
- value = value.replaceAll("\n", "");
54
try {
55
return Base64.getDecoder().decode(value);
56
} catch (Exception ex) {
57
- return Base64.getUrlDecoder().decode(value);
+ try {
+ return Base64.getUrlDecoder().decode(value);
58
+ } catch (Exception e) {
59
+ return Base64.getMimeDecoder().decode(value);
60
+ }
61
62
63
0 commit comments