Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
update node_crypto.cc
As the documentation for crypto.pbkdf2 (https://nodejs.org/dist/latest-v8.x/docs/api/crypto.html#crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback) say, the function on success will return the first argument set to null and not undefined.
  • Loading branch information
BufoViridis authored Jan 30, 2018
commit dbd212a8a152b1e777b3f7baaa261dec40ca8f19
2 changes: 1 addition & 1 deletion src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4918,7 +4918,7 @@ void PBKDF2Request::Work(uv_work_t* work_req) {

void PBKDF2Request::After(Local<Value> (*argv)[2]) {
if (success_) {
(*argv)[0] = Undefined(env()->isolate());
(*argv)[0] = Null(env()->isolate());
(*argv)[1] = Buffer::New(env(), key_, keylen_).ToLocalChecked();
key_ = nullptr;
keylen_ = 0;
Expand Down