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

Function eddsaSignVerify

lib/internal/crypto/cfrg.js:190–212  ·  view source on GitHub ↗
(key, data, algorithm, signature)

Source from the content-addressed store, hash-verified

188}
189
190function eddsaSignVerify(key, data, algorithm, signature) {
191 const mode = signature === undefined ? kSignJobModeSign : kSignJobModeVerify;
192 const type = mode === kSignJobModeSign ? 'private' : 'public';
193
194 if (getCryptoKeyType(key) !== type)
195 throw lazyDOMException(`Key must be a ${type} key`, 'InvalidAccessError');
196
197 return jobPromise(() => new SignJob(
198 kCryptoJobWebCrypto,
199 mode,
200 getCryptoKeyHandle(key),
201 undefined,
202 undefined,
203 undefined,
204 undefined,
205 data,
206 undefined,
207 undefined,
208 undefined,
209 undefined,
210 algorithm.name === 'Ed448' ? algorithm.context : undefined,
211 signature));
212}
213
214module.exports = {
215 cfrgExportKey,

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…