MCPcopy
hub / github.com/mongodb/node-mongodb-native / H

Function H

src/cmap/auth/scram.ts:270–273  ·  view source on GitHub ↗
(method: CryptoMethod, text: Uint8Array)

Source from the content-addressed store, hash-verified

268}
269
270async function H(method: CryptoMethod, text: Uint8Array): Promise<Uint8Array> {
271 const buffer = await crypto.subtle.digest(method === 'sha256' ? 'SHA-256' : 'SHA-1', text);
272 return new Uint8Array(buffer);
273}
274
275async function HMAC(
276 method: CryptoMethod,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected