File tree Expand file tree Collapse file tree
commonMain/kotlin/com/eignex/kencode
commonTest/kotlin/com/eignex/kencode Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ implementations support custom alphabets.
136136 padding. Main use is to have 100% alpha-numeric output, with or without
137137 upper-case.
138138* Base85: High-density encoding (4 bytes to 5 characters).
139- * Base64 / Base64UrlSafe : RFC 4648 compatible.
139+ * Base64 / Base64Url : RFC 4648 compatible.
140140
141141Encoding ` "any byte data" ` (13 bytes):
142142
Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ package com.eignex.kencode
33const val BASE_64 =
44 " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
55
6- const val BASE_64_URL_SAFE =
6+ const val BASE_64_URL =
77 " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
88
9- object Base64UrlSafe : Base64(BASE_64_URL_SAFE .toCharArray())
9+ object Base64Url : Base64(BASE_64_URL .toCharArray())
1010
1111/* *
1212 * RFC 4648–compatible Base64 encoder/decoder.
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ class Base64Test {
6464 }
6565
6666 @Test
67- fun `fixed patterns should roundtrip for Base64UrlSafe ` () {
67+ fun `fixed patterns should roundtrip for Base64Url ` () {
6868 val patterns = listOf (
6969 byteArrayOf(),
7070 byteArrayOf(0 ),
@@ -77,7 +77,7 @@ class Base64Test {
7777
7878 for (bytes in patterns) {
7979 assertRoundtrip(
80- Base64UrlSafe ,
80+ Base64Url ,
8181 bytes,
8282 " Failed for pattern=${bytes.toList()} "
8383 )
You can’t perform that action at this time.
0 commit comments