diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2020-10-29 06:22:41 +0100 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2020-10-31 04:44:59 -0700 |
commit | 65c9d678ed959d9274cf784dbdb281c2b6d77d0a (patch) | |
tree | 99cef912b23ed1cc0c9b1f3ecd942df383134615 | |
parent | 1139a4af88880ce1b61a404012f2ff6c6b1c1851 (diff) | |
download | node-new-65c9d678ed959d9274cf784dbdb281c2b6d77d0a.tar.gz |
crypto: rename check to createJob
This commit renames the check function to createJob which seems to be
more descriptive of what this function does.
PR-URL: https://github.com/nodejs/node/pull/35858
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
-rw-r--r-- | lib/internal/crypto/keygen.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/internal/crypto/keygen.js b/lib/internal/crypto/keygen.js index 8260f59588..5f29a3153b 100644 --- a/lib/internal/crypto/keygen.js +++ b/lib/internal/crypto/keygen.js @@ -71,7 +71,7 @@ function generateKeyPair(type, options, callback) { if (typeof callback !== 'function') throw new ERR_INVALID_CALLBACK(callback); - const job = check(kCryptoJobAsync, type, options); + const job = createJob(kCryptoJobAsync, type, options); job.ondone = (error, result) => { if (error) return FunctionPrototypeCall(callback, job, error); @@ -91,7 +91,7 @@ ObjectDefineProperty(generateKeyPair, customPromisifyArgs, { }); function generateKeyPairSync(type, options) { - return handleError(check(kCryptoJobSync, type, options).run()); + return handleError(createJob(kCryptoJobSync, type, options).run()); } function handleError(ret) { @@ -152,7 +152,7 @@ function parseKeyEncoding(keyType, options = {}) { ]; } -function check(mode, type, options) { +function createJob(mode, type, options) { validateString(type, 'type'); const encoding = parseKeyEncoding(type, options); |