signature : Remove useless trailing 0

This commit is contained in:
2024-06-09 13:42:40 +02:00
parent 5ee8fc00d0
commit 0e4e51ce87
+1 -1
View File
@@ -65,7 +65,7 @@ function crypto_pubkey(point: ProjPointType<bigint>) : Promise<CryptoKey> {
)
}
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