Skip to content

Commit 644c416

Browse files
danbevtargos
authored andcommitted
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: #35858 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 337bfcf commit 644c416

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/internal/crypto/keygen.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function generateKeyPair(type, options, callback) {
7171
if (typeof callback !== 'function')
7272
throw new ERR_INVALID_CALLBACK(callback);
7373

74-
const job = check(kCryptoJobAsync, type, options);
74+
const job = createJob(kCryptoJobAsync, type, options);
7575

7676
job.ondone = (error, result) => {
7777
if (error) return FunctionPrototypeCall(callback, job, error);
@@ -91,7 +91,7 @@ ObjectDefineProperty(generateKeyPair, customPromisifyArgs, {
9191
});
9292

9393
function generateKeyPairSync(type, options) {
94-
return handleError(check(kCryptoJobSync, type, options).run());
94+
return handleError(createJob(kCryptoJobSync, type, options).run());
9595
}
9696

9797
function handleError(ret) {
@@ -152,7 +152,7 @@ function parseKeyEncoding(keyType, options = {}) {
152152
];
153153
}
154154

155-
function check(mode, type, options) {
155+
function createJob(mode, type, options) {
156156
validateString(type, 'type');
157157

158158
const encoding = parseKeyEncoding(type, options);

0 commit comments

Comments
 (0)