Skip to content

Commit

Permalink
fix encoding sha to url
Browse files Browse the repository at this point in the history
  • Loading branch information
avan1235 committed May 9, 2024
1 parent 4f8935a commit 408afbb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private fun String.normalizeUrlCase(): String? = try {
private fun String.sha256(): String = MessageDigest
.getInstance("SHA-256")
.digest(toByteArray())
.let(Base64.getEncoder()::encodeToString)
.let(Base64.getUrlEncoder()::encodeToString)

private data class ShortenedIdentifier(
val url: String,
Expand Down

0 comments on commit 408afbb

Please sign in to comment.