import { default } from "https://deno.land/x/jose@v3.20.4/jwk/thumbprint.ts";
Calculates a base64url-encoded JSON Web Key (JWK) Thumbprint as per RFC7638.
Examples
ESM import
ESM import
import { calculateThumbprint } from 'jose/jwk/thumbprint'
CJS import
CJS import
const { calculateThumbprint } = require('jose/jwk/thumbprint')
Deno import
Deno import
import { calculateThumbprint } from 'https://deno.land/x/jose@VERSION/jwk/thumbprint.ts'
Usage
Usage
const thumbprint = await calculateThumbprint({
kty: 'RSA',
e: 'AQAB',
n: '12oBZRhCiZFJLcPg59LkZZ9mdhSMTKAQZYq32k_ti5SBB6jerkh-WzOMAO664r_qyLkqHUSp3u5SbXtseZEpN3XPWGKSxjsy-1JyEFTdLSYe6f9gfrmxkUF_7DTpq0gn6rntP05g2-wFW50YO7mosfdslfrTJYWHFhJALabAeYirYD7-9kqq9ebfFMF4sRRELbv9oi36As6Q9B3Qb5_C1rAzqfao_PCsf9EPsTZsVVVkA5qoIAr47lo1ipfiBPxUCCNSdvkmDTYgvvRm6ZoMjFbvOtgyts55fXKdMWv7I9HMD5HwE9uW839PWA514qhbcIsXEYSFMPMV6fnlsiZvQQ'
})
console.log(thumbprint)
Parameters
jwk: JWK
JSON Web Key.