From 0e4e51ce877c8cc812e73ddaac9930d94326f578 Mon Sep 17 00:00:00 2001 From: Pascal Perrenoud Date: Sun, 9 Jun 2024 13:42:40 +0200 Subject: [PATCH] signature : Remove useless trailing 0 --- src/signature.derive.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/signature.derive.ts b/src/signature.derive.ts index dd3820c..a5f01c7 100644 --- a/src/signature.derive.ts +++ b/src/signature.derive.ts @@ -65,7 +65,7 @@ function crypto_pubkey(point: ProjPointType) : Promise { ) } function bg2b64url(n: bigint) : string { - return encode(btoa(String.fromCharCode(0) + String.fromCharCode(...hexToBytes(numberToHexUnpadded(n))))) + return encode(btoa(String.fromCharCode(...hexToBytes(numberToHexUnpadded(n))))) } function encode(input: string) : string { // Replace non-url compatible chars with base64 standard chars