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

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎lib/internal/crypto/keygen.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function generateKeyPair(type, options, callback) {
7171
if(typeofcallback!=='function')
7272
thrownewERR_INVALID_CALLBACK(callback);
7373

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

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

9393
functiongenerateKeyPairSync(type,options){
94-
returnhandleError(check(kCryptoJobSync,type,options).run());
94+
returnhandleError(createJob(kCryptoJobSync,type,options).run());
9595
}
9696

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

155-
functioncheck(mode,type,options){
155+
functioncreateJob(mode,type,options){
156156
validateString(type,'type');
157157

158158
constencoding=parseKeyEncoding(type,options);

0 commit comments

Comments
 (0)