MCPcopy Create free account
hub / github.com/cloudflare/wildebeest / verifySignature

Function verifySignature

backend/src/utils/httpsigjs/verifier.ts:12–19  ·  view source on GitHub ↗
(parsedSignature: ParsedSignature, key: CryptoKey)

Source from the content-addressed store, hash-verified

10}
11
12export async function verifySignature(parsedSignature: ParsedSignature, key: CryptoKey): Promise<boolean> {
13 return crypto.subtle.verify(
14 'RSASSA-PKCS1-v1_5',
15 key,
16 str2ab(atob(parsedSignature.signature)),
17 str2ab(parsedSignature.signingString)
18 )
19}
20
21export async function fetchKey(parsedSignature: ParsedSignature): Promise<CryptoKey | null> {
22 const url = parsedSignature.keyId

Callers 2

utils.spec.tsFile · 0.90
onRequestFunction · 0.90

Calls 1

str2abFunction · 0.90

Tested by

no test coverage detected