Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Aug 28, 2024
1 parent 4653dc7 commit 9f1b315
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/contrib/cashu-ts/dist/lib/es5/base64.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ function encodeUint8toBase64(uint8array) {
}
exports.encodeUint8toBase64 = encodeUint8toBase64;
function encodeUint8toBase64Url(bytes) {
return buffer_1.Buffer.from(bytes).toString('base64url').replace(/\=+$/, '');
return buffer_1.Buffer.from(bytes)
.toString('base64')
.replace(/\+/g, '-') // Replace + with -
.replace(/\//g, '_') // Replace / with _
.replace(/=+$/, ''); // Remove padding characters
}
exports.encodeUint8toBase64Url = encodeUint8toBase64Url;
function encodeBase64toUint8(base64String) {
Expand Down
6 changes: 5 additions & 1 deletion src/contrib/cashu-ts/dist/lib/es6/base64.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/contrib/cashu-ts/dist/lib/es6/base64.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9f1b315

Please sign in to comment.