Skip to content

Commit c1342a1

Browse files
committed
fixup! crypto: add signDigest/verifyDigest and Ed25519ctx support
1 parent 8503f4d commit c1342a1

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

lib/internal/crypto/sig.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,6 @@ function signOneShotImpl(algorithm, data, key, callback, prehashed) {
228228
job.run();
229229
}
230230

231-
function signOneShot(algorithm, data, key, callback) {
232-
return signOneShotImpl(algorithm, data, key, callback, false);
233-
}
234-
235231
function Verify(algorithm, options) {
236232
if (!(this instanceof Verify))
237233
return new Verify(algorithm, options);
@@ -334,16 +330,20 @@ function verifyOneShotImpl(algorithm, data, key, signature, callback, prehashed)
334330
job.run();
335331
}
336332

333+
function signOneShot(algorithm, data, key, callback) {
334+
return signOneShotImpl(algorithm, data, key, callback, false /* not prehashed */);
335+
}
336+
337337
function verifyOneShot(algorithm, data, key, signature, callback) {
338-
return verifyOneShotImpl(algorithm, data, key, signature, callback, false);
338+
return verifyOneShotImpl(algorithm, data, key, signature, callback, false /* not prehashed */);
339339
}
340340

341341
function signDigestOneShot(algorithm, digest, key, callback) {
342-
return signOneShotImpl(algorithm, digest, key, callback, true);
342+
return signOneShotImpl(algorithm, digest, key, callback, true /* prehashed */);
343343
}
344344

345345
function verifyDigestOneShot(algorithm, digest, key, signature, callback) {
346-
return verifyOneShotImpl(algorithm, digest, key, signature, callback, true);
346+
return verifyOneShotImpl(algorithm, digest, key, signature, callback, true /* prehashed */);
347347
}
348348

349349
module.exports = {

0 commit comments

Comments
 (0)