Skip to content

Conversation

@xinsong-cui
Copy link
Contributor

Issue #

Description of changes

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@xinsong-cui xinsong-cui added the no-changelog Indicates that a changelog entry isn't required for a pull request. Use sparingly. label Oct 24, 2025
@xinsong-cui xinsong-cui marked this pull request as ready for review October 24, 2025 19:33
@xinsong-cui xinsong-cui requested a review from a team as a code owner October 24, 2025 19:33
Comment on lines +56 to +64
/**
* Encode [ByteArray] in base64url format (RFC 4648) as a [String]
*/
public fun ByteArray.encodeBase64Url(): String =
encodeBase64String()
.replace('+', '-')
.replace('/', '_')
.trimEnd('=')

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the stdlib API instead of implementing this ourselves? https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.io.encoding/-base64/-default/-url-safe.html

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I wasn't aware of that, yeah I think we can just use that API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Indicates that a changelog entry isn't required for a pull request. Use sparingly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants