forked from LaconicNetwork/icns-frontend
Use Buffer
package instead of Buffer on nodejs
This commit is contained in:
parent
b47c09fb6f
commit
1ea85324aa
@ -1,5 +1,7 @@
|
||||
export function base64URLEncode(str: Buffer) {
|
||||
return str
|
||||
import { Buffer } from "buffer/";
|
||||
|
||||
export function base64URLEncode(str: Uint8Array) {
|
||||
return Buffer.from(str)
|
||||
.toString("base64")
|
||||
.replace(/\+/g, "-")
|
||||
.replace(/\//g, "_")
|
||||
|
Loading…
Reference in New Issue
Block a user