From e76014969923fdbceb2c63a90351d3e8d2521d1c Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 18 Nov 2023 08:02:11 -0500 Subject: [PATCH] fix: base64urlpad requires a "U" prefix --- src/multibase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/multibase.ts b/src/multibase.ts index 95cacac..7b26e93 100644 --- a/src/multibase.ts +++ b/src/multibase.ts @@ -19,7 +19,7 @@ export default abstract class Multibase { } bytes = base32.decode(str); } else if (data[0] === "u") { - let str = data; + let str = data[0].toUpperCase() + data.substring(1); while (str.length % 4 !== 0) { str += "="; }