Skip to content

Commit 09ed874

Browse files
authored
Update Base64.java
1 parent e5b07eb commit 09ed874

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/crypto/codec/Base64.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ public static byte[] decode(String base64String) {
135135
if (base64String == null) {
136136
throw new IllegalArgumentException("Base64 string must not be null!");
137137
}
138-
139-
base64String = base64String.strip();
138+
// remove trailing spaces if any
139+
base64String = base64String.trim();
140140
if (!isValidBase64String(base64String)) {
141141
throw new IllegalArgumentException("String is not a valid Base64 string!");
142142
}

0 commit comments

Comments
 (0)