File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
src/main/kotlin/com/lambda/util Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,7 @@ import com.lambda.Lambda
2121import com.lambda.Lambda.gson
2222import net.minecraft.util.Identifier
2323import java.security.MessageDigest
24- import kotlin.io.encoding.Base64
25- import kotlin.io.encoding.ExperimentalEncodingApi
24+ import java.util.Base64
2625
2726object StringUtils {
2827 fun String.sanitizeForFilename () =
@@ -92,11 +91,7 @@ object StringUtils {
9291
9392 inline fun <reified T : Any > String.json () = gson.fromJson(this , T ::class .java)
9493
95- /* *
96- * @see kotlin.io.encoding.Base64.decode
97- */
98- @OptIn(ExperimentalEncodingApi ::class )
99- fun String.base64UrlDecode () = Base64 .UrlSafe .decode(this ).decodeToString()
94+ fun String.base64UrlDecode () = Base64 .getUrlDecoder().decode(toByteArray()).decodeToString()
10095
10196 /* *
10297 * @see <a href="https://docs.oracle.com/en/java/javase/11/docs/specs/security/standard-names.html#messagedigest-algorithms">Java Security Standard Algorithm Names Specification</a>
You can’t perform that action at this time.
0 commit comments