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

Function mlDsaSignVerify

lib/internal/crypto/ml_dsa.js:199–221  ·  view source on GitHub ↗
(key, data, algorithm, signature)

Source from the content-addressed store, hash-verified

197}
198
199function mlDsaSignVerify(key, data, algorithm, signature) {
200 const mode = signature === undefined ? kSignJobModeSign : kSignJobModeVerify;
201 const type = mode === kSignJobModeSign ? 'private' : 'public';
202
203 if (getCryptoKeyType(key) !== type)
204 throw lazyDOMException(`Key must be a ${type} key`, 'InvalidAccessError');
205
206 return jobPromise(() => new SignJob(
207 kCryptoJobWebCrypto,
208 mode,
209 getCryptoKeyHandle(key),
210 undefined,
211 undefined,
212 undefined,
213 undefined,
214 data,
215 undefined,
216 undefined,
217 undefined,
218 undefined,
219 algorithm.context,
220 signature));
221}
222
223module.exports = {
224 mlDsaExportKey,

Callers

nothing calls this directly

Calls 4

getCryptoKeyTypeFunction · 0.85
lazyDOMExceptionFunction · 0.85
jobPromiseFunction · 0.85
getCryptoKeyHandleFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…