Skip to content

Commit

Permalink
feat: add base64urlToHex function
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed Jun 10, 2024
1 parent 9ae40ff commit 1310661
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
"ignore": ["*-demo"]
}
4 changes: 4 additions & 0 deletions packages/common/src/utils/buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,7 @@ export function hexToString(hex: string): string {
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16))
return str
}

export function base64urlToHex(s: string) {
return bufferToHex(base64URLStringToBuffer(s))
}

0 comments on commit 1310661

Please sign in to comment.