INNER CODE UNIT · TypeScript
point
bex-co/beancount-io · backend-cluster/backend-v2/src/config/jwks/index.ts:109
const point = ecdh.getPublicKey(); // 0x04 || X || Y
const x = point.subarray(1, 33);
const y = point.subarray(33, 65);
const kid = createHash("sha256")
.update(x)
.update(y)
.digest("base64url")
.slice(0, 22);
return {
keys: [
{
kty: "EC",
crv: "P-256",
alg: "ES256",
use: "sig",
kid,
x: x.toString("base64url"),