UNPKG

@redocly/graphql-docs

Version:

Redocly GraphQL docs

2 lines (1 loc) 449 B
const r={name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"};function o(e){const t=new ArrayBuffer(e.length),c=new Uint8Array(t);for(let n=0,i=e.length;n<i;n++)c[n]=e.charCodeAt(n);return t}function u(){const e=o(atob(REDOCLY_PUBLIC_KEY));return crypto.subtle.importKey("spki",e,r,!0,["verify"])}function a(e){return new TextEncoder().encode(e)}async function f(e,t){return crypto.subtle.verify(r,await u(),o(atob(t)),a(e))}export{r as algorithm,f as verify};