MCPcopy Index your code
hub / github.com/nodejs/node / digestImpl

Function digestImpl

lib/internal/crypto/webcrypto.js:143–153  ·  view source on GitHub ↗
(algorithm, data)

Source from the content-addressed store, hash-verified

141}
142
143function digestImpl(algorithm, data) {
144 const prefix = prepareSubtleMethod(this, 'digest', arguments.length, 2);
145 let i = 0;
146 algorithm = convertSubtleArgument(
147 prefix, 'AlgorithmIdentifier', algorithm, i++);
148 data = convertSubtleArgument(prefix, 'BufferSource', data, i++);
149
150 const normalizedAlgorithm = normalizeAlgorithm(algorithm, 'digest');
151
152 return FunctionPrototypeCall(asyncDigest, this, normalizedAlgorithm, data);
153}
154
155function randomUUID() {
156 if (this !== crypto) throw new ERR_INVALID_THIS('Crypto');

Callers

nothing calls this directly

Calls 3

prepareSubtleMethodFunction · 0.85
convertSubtleArgumentFunction · 0.85
normalizeAlgorithmFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…