Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2018-05-18 12:05:20 +0300
committerBen Noordhuis <info@bnoordhuis.nl>2018-06-13 16:58:45 +0300
commit371103dae8b97264471e17de1989199ffcd2718e (patch)
tree4fb8517aa00fdbd0a6315719d04f2cd7211b753a /src/async_wrap.h
parent58176e352c7b4fe6042fc31283a79d8de4cdb569 (diff)
crypto: add scrypt() and scryptSync() methods
Scrypt is a password-based key derivation function that is designed to be expensive both computationally and memory-wise in order to make brute-force attacks unrewarding. OpenSSL has had support for the scrypt algorithm since v1.1.0. Add a Node.js API modeled after `crypto.pbkdf2()` and `crypto.pbkdf2Sync()`. Changes: * Introduce helpers for copying buffers, collecting openssl errors, etc. * Add new infrastructure for offloading crypto to a worker thread. * Add a `AsyncWrap` JS class to simplify pbkdf2(), randomBytes() and scrypt(). Fixes: https://github.com/nodejs/node/issues/8417 PR-URL: https://github.com/nodejs/node/pull/20816 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'src/async_wrap.h')
-rw-r--r--src/async_wrap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/async_wrap.h b/src/async_wrap.h
index b2f96477b49..f696facd485 100644
--- a/src/async_wrap.h
+++ b/src/async_wrap.h
@@ -75,6 +75,7 @@ namespace node {
#define NODE_ASYNC_CRYPTO_PROVIDER_TYPES(V) \
V(PBKDF2REQUEST) \
V(RANDOMBYTESREQUEST) \
+ V(SCRYPTREQUEST) \
V(TLSWRAP)
#else
#define NODE_ASYNC_CRYPTO_PROVIDER_TYPES(V)