GeezerVison is showing github.com — crypto: add scrypt() and scryptSync() methods · nodejs/node@c9b4592
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: doc/api/crypto.md +95-11Lines changed: 95 additions & 11 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1356,9 +1356,9 @@ password always creates the same key. The low iteration count and | 1356 | 1356 | non-cryptographically secure hash algorithm allow passwords to be tested very | 1357 | 1357 | rapidly. | 1358 | 1358 |
| 1359 | | -In line with OpenSSL's recommendation to use PBKDF2 instead of | | 1359 | +In line with OpenSSL's recommendation to use a more modern algorithm instead of | 1360 | 1360 | [`EVP_BytesToKey`][] it is recommended that developers derive a key and IV on | 1361 | | -their own using [`crypto.pbkdf2()`][] and to use [`crypto.createCipheriv()`][] | | 1361 | +their own using [`crypto.scrypt()`][] and to use [`crypto.createCipheriv()`][] | 1362 | 1362 | to create the `Cipher` object. Users should not use ciphers with counter mode | 1363 | 1363 | (e.g. CTR, GCM, or CCM) in `crypto.createCipher()`. A warning is emitted when | 1364 | 1364 | they are used in order to avoid the risk of IV reuse that causes | @@ -1458,9 +1458,9 @@ password always creates the same key. The low iteration count and | 1458 | 1458 | non-cryptographically secure hash algorithm allow passwords to be tested very | 1459 | 1459 | rapidly. | 1460 | 1460 |
| 1461 | | -In line with OpenSSL's recommendation to use PBKDF2 instead of | | 1461 | +In line with OpenSSL's recommendation to use a more modern algorithm instead of | 1462 | 1462 | [`EVP_BytesToKey`][] it is recommended that developers derive a key and IV on | 1463 | | -their own using [`crypto.pbkdf2()`][] and to use [`crypto.createDecipheriv()`][] | | 1463 | +their own using [`crypto.scrypt()`][] and to use [`crypto.createDecipheriv()`][] | 1464 | 1464 | to create the `Decipher` object. | 1465 | 1465 |
| 1466 | 1466 | ### crypto.createDecipheriv(algorithm, key, iv[, options]) | @@ -1796,9 +1796,8 @@ The `iterations` argument must be a number set as high as possible. The | 1796 | 1796 | higher the number of iterations, the more secure the derived key will be, | 1797 | 1797 | but will take a longer amount of time to complete. | 1798 | 1798 |
| 1799 | | -The `salt` should also be as unique as possible. It is recommended that the | 1800 | | -salts are random and their lengths are at least 16 bytes. See | 1801 | | -[NIST SP 800-132][] for details. | | 1799 | +The `salt` should be as unique as possible. It is recommended that a salt is | | 1800 | +random and at least 16 bytes long. See [NIST SP 800-132][] for details. | 1802 | 1801 |
| 1803 | 1802 | Example: | 1804 | 1803 |
| @@ -1862,9 +1861,8 @@ The `iterations` argument must be a number set as high as possible. The | 1862 | 1861 | higher the number of iterations, the more secure the derived key will be, | 1863 | 1862 | but will take a longer amount of time to complete. | 1864 | 1863 |
| 1865 | | -The `salt` should also be as unique as possible. It is recommended that the | 1866 | | -salts are random and their lengths are at least 16 bytes. See | 1867 | | -[NIST SP 800-132][] for details. | | 1864 | +The `salt` should be as unique as possible. It is recommended that a salt is | | 1865 | +random and at least 16 bytes long. See [NIST SP 800-132][] for details. | 1868 | 1866 |
| 1869 | 1867 | Example: | 1870 | 1868 |
| @@ -2138,6 +2136,91 @@ threadpool request. To minimize threadpool task length variation, partition | 2138 | 2136 | large `randomFill` requests when doing so as part of fulfilling a client | 2139 | 2137 | request. | 2140 | 2138 |
| | 2139 | +### crypto.scrypt(password, salt, keylen[, options], callback) | | 2140 | +<!-- YAML | | 2141 | +added: REPLACEME | | 2142 | +--> | | 2143 | +- `password` {string|Buffer|TypedArray} | | 2144 | +- `salt` {string|Buffer|TypedArray} | | 2145 | +- `keylen` {number} | | 2146 | +- `options` {Object} | | 2147 | + - `N` {number} CPU/memory cost parameter. Must be a power of two greater | | 2148 | + than one. **Default:** `16384`. | | 2149 | + - `r` {number} Block size parameter. **Default:** `8`. | | 2150 | + - `p` {number} Parallelization parameter. **Default:** `1`. | | 2151 | + - `maxmem` {number} Memory upper bound. It is an error when (approximately) | | 2152 | + `128*N*r > maxmem` **Default:** `32 * 1024 * 1024`. | | 2153 | +- `callback` {Function} | | 2154 | + - `err` {Error} | | 2155 | + - `derivedKey` {Buffer} | | 2156 | + | | 2157 | +Provides an asynchronous [scrypt][] implementation. Scrypt is a password-based | | 2158 | +key derivation function that is designed to be expensive computationally and | | 2159 | +memory-wise in order to make brute-force attacks unrewarding. | | 2160 | + | | 2161 | +The `salt` should be as unique as possible. It is recommended that a salt is | | 2162 | +random and at least 16 bytes long. See [NIST SP 800-132][] for details. | | 2163 | + | | 2164 | +The `callback` function is called with two arguments: `err` and `derivedKey`. | | 2165 | +`err` is an exception object when key derivation fails, otherwise `err` is | | 2166 | +`null`. `derivedKey` is passed to the callback as a [`Buffer`][]. | | 2167 | + | | 2168 | +An exception is thrown when any of the input arguments specify invalid values | | 2169 | +or types. | | 2170 | + | | 2171 | +```js | | 2172 | +const crypto = require('crypto'); | | 2173 | +// Using the factory defaults. | | 2174 | +crypto.scrypt('secret', 'salt', 64, (err, derivedKey) => { | | 2175 | + if (err) throw err; | | 2176 | + console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' | | 2177 | +}); | | 2178 | +// Using a custom N parameter. Must be a power of two. | | 2179 | +crypto.scrypt('secret', 'salt', 64, { N: 1024 }, (err, derivedKey) => { | | 2180 | + if (err) throw err; | | 2181 | + console.log(derivedKey.toString('hex')); // '3745e48...aa39b34' | | 2182 | +}); | | 2183 | +``` | | 2184 | + | | 2185 | +### crypto.scryptSync(password, salt, keylen[, options]) | | 2186 | +<!-- YAML | | 2187 | +added: REPLACEME | | 2188 | +--> | | 2189 | +- `password` {string|Buffer|TypedArray} | | 2190 | +- `salt` {string|Buffer|TypedArray} | | 2191 | +- `keylen` {number} | | 2192 | +- `options` {Object} | | 2193 | + - `N` {number} CPU/memory cost parameter. Must be a power of two greater | | 2194 | + than one. **Default:** `16384`. | | 2195 | + - `r` {number} Block size parameter. **Default:** `8`. | | 2196 | + - `p` {number} Parallelization parameter. **Default:** `1`. | | 2197 | + - `maxmem` {number} Memory upper bound. It is an error when (approximately) | | 2198 | + `128*N*r > maxmem` **Default:** `32 * 1024 * 1024`. | | 2199 | +- Returns: {Buffer} | | 2200 | + | | 2201 | +Provides a synchronous [scrypt][] implementation. Scrypt is a password-based | | 2202 | +key derivation function that is designed to be expensive computationally and | | 2203 | +memory-wise in order to make brute-force attacks unrewarding. | | 2204 | + | | 2205 | +The `salt` should be as unique as possible. It is recommended that a salt is | | 2206 | +random and at least 16 bytes long. See [NIST SP 800-132][] for details. | | 2207 | + | | 2208 | +An exception is thrown when key derivation fails, otherwise the derived key is | | 2209 | +returned as a [`Buffer`][]. | | 2210 | + | | 2211 | +An exception is thrown when any of the input arguments specify invalid values | | 2212 | +or types. | | 2213 | + | | 2214 | +```js | | 2215 | +const crypto = require('crypto'); | | 2216 | +// Using the factory defaults. | | 2217 | +const key1 = crypto.scryptSync('secret', 'salt', 64); | | 2218 | +console.log(key1.toString('hex')); // '3745e48...08d59ae' | | 2219 | +// Using a custom N parameter. Must be a power of two. | | 2220 | +const key2 = crypto.scryptSync('secret', 'salt', 64, { N: 1024 }); | | 2221 | +console.log(key2.toString('hex')); // '3745e48...aa39b34' | | 2222 | +``` | | 2223 | + | 2141 | 2224 | ### crypto.setEngine(engine[, flags]) | 2142 | 2225 | <!-- YAML | 2143 | 2226 | added: v0.11.11 | @@ -2645,9 +2728,9 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL. | 2645 | 2728 | [`crypto.createVerify()`]: #crypto_crypto_createverify_algorithm_options | 2646 | 2729 | [`crypto.getCurves()`]: #crypto_crypto_getcurves | 2647 | 2730 | [`crypto.getHashes()`]: #crypto_crypto_gethashes | 2648 | | -[`crypto.pbkdf2()`]: #crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback | 2649 | 2731 | [`crypto.randomBytes()`]: #crypto_crypto_randombytes_size_callback | 2650 | 2732 | [`crypto.randomFill()`]: #crypto_crypto_randomfill_buffer_offset_size_callback | | 2733 | +[`crypto.scrypt()`]: #crypto_crypto_scrypt_password_salt_keylen_options_callback | 2651 | 2734 | [`decipher.final()`]: #crypto_decipher_final_outputencoding | 2652 | 2735 | [`decipher.update()`]: #crypto_decipher_update_data_inputencoding_outputencoding | 2653 | 2736 | [`diffieHellman.setPublicKey()`]: #crypto_diffiehellman_setpublickey_publickey_encoding | @@ -2681,5 +2764,6 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL. | 2681 | 2764 | [RFC 3610]: https://www.rfc-editor.org/rfc/rfc3610.txt | 2682 | 2765 | [RFC 4055]: https://www.rfc-editor.org/rfc/rfc4055.txt | 2683 | 2766 | [initialization vector]: https://en.wikipedia.org/wiki/Initialization_vector | | 2767 | +[scrypt]: https://en.wikipedia.org/wiki/Scrypt | 2684 | 2768 | [stream-writable-write]: stream.html#stream_writable_write_chunk_encoding_callback | 2685 | 2769 | [stream]: stream.html |
Collapse file Copy file name to clipboardExpand all lines: doc/api/errors.md +14Lines changed: 14 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -739,6 +739,18 @@ An invalid [crypto digest algorithm][] was specified. | 739 | 739 | A crypto method was used on an object that was in an invalid state. For | 740 | 740 | instance, calling [`cipher.getAuthTag()`][] before calling `cipher.final()`. | 741 | 741 |
| | 742 | +<a id="ERR_CRYPTO_SCRYPT_INVALID_PARAMETER"></a> | | 743 | +### ERR_CRYPTO_SCRYPT_INVALID_PARAMETER | | 744 | + | | 745 | +One or more [`crypto.scrypt()`][] or [`crypto.scryptSync()`][] parameters are | | 746 | +outside their legal range. | | 747 | + | | 748 | +<a id="ERR_CRYPTO_SCRYPT_NOT_SUPPORTED"></a> | | 749 | +### ERR_CRYPTO_SCRYPT_NOT_SUPPORTED | | 750 | + | | 751 | +Node.js was compiled without `scrypt` support. Not possible with the official | | 752 | +release binaries but can happen with custom builds, including distro builds. | | 753 | + | 742 | 754 | <a id="ERR_CRYPTO_SIGN_KEY_REQUIRED"></a> | 743 | 755 | ### ERR_CRYPTO_SIGN_KEY_REQUIRED | 744 | 756 |
| @@ -1750,6 +1762,8 @@ Creation of a [`zlib`][] object failed due to incorrect configuration. | 1750 | 1762 | [`child_process`]: child_process.html | 1751 | 1763 | [`cipher.getAuthTag()`]: crypto.html#crypto_cipher_getauthtag | 1752 | 1764 | [`Class: assert.AssertionError`]: assert.html#assert_class_assert_assertionerror | | 1765 | +[`crypto.scrypt()`]: crypto.html#crypto_crypto_scrypt_password_salt_keylen_options_callback | | 1766 | +[`crypto.scryptSync()`]: crypto.html#crypto_crypto_scryptSync_password_salt_keylen_options | 1753 | 1767 | [`crypto.timingSafeEqual()`]: crypto.html#crypto_crypto_timingsafeequal_a_b | 1754 | 1768 | [`dgram.createSocket()`]: dgram.html#dgram_dgram_createsocket_options_callback | 1755 | 1769 | [`ERR_INVALID_ARG_TYPE`]: #ERR_INVALID_ARG_TYPE | |
Collapse file Copy file name to clipboardExpand all lines: lib/crypto.js +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -52,6 +52,10 @@ const { | 52 | 52 | pbkdf2, | 53 | 53 | pbkdf2Sync | 54 | 54 | } = require('internal/crypto/pbkdf2'); | | 55 | +const { | | 56 | + scrypt, | | 57 | + scryptSync | | 58 | +} = require('internal/crypto/scrypt'); | 55 | 59 | const { | 56 | 60 | DiffieHellman, | 57 | 61 | DiffieHellmanGroup, | @@ -163,6 +167,8 @@ module.exports = exports = { | 163 | 167 | randomFill, | 164 | 168 | randomFillSync, | 165 | 169 | rng: randomBytes, | | 170 | + scrypt, | | 171 | + scryptSync, | 166 | 172 | setEngine, | 167 | 173 | timingSafeEqual, | 168 | 174 | getFips: !fipsMode ? getFipsDisabled : | |
Collapse file Copy file name to clipboard +97Lines changed: 97 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +'use strict'; | | 2 | + | | 3 | +const { AsyncWrap, Providers } = process.binding('async_wrap'); | | 4 | +const { Buffer } = require('buffer'); | | 5 | +const { scrypt: _scrypt } = process.binding('crypto'); | | 6 | +const { | | 7 | + ERR_CRYPTO_SCRYPT_INVALID_PARAMETER, | | 8 | + ERR_CRYPTO_SCRYPT_NOT_SUPPORTED, | | 9 | + ERR_INVALID_CALLBACK, | | 10 | +} = require('internal/errors').codes; | | 11 | +const { | | 12 | + checkIsArrayBufferView, | | 13 | + checkIsUint, | | 14 | + getDefaultEncoding, | | 15 | +} = require('internal/crypto/util'); | | 16 | + | | 17 | +const defaults = { | | 18 | + N: 16384, | | 19 | + r: 8, | | 20 | + p: 1, | | 21 | + maxmem: 32 << 20, // 32 MB, matches SCRYPT_MAX_MEM. | | 22 | +}; | | 23 | + | | 24 | +function scrypt(password, salt, keylen, options, callback = defaults) { | | 25 | + if (callback === defaults) { | | 26 | + callback = options; | | 27 | + options = defaults; | | 28 | + } | | 29 | + | | 30 | + options = check(password, salt, keylen, options); | | 31 | + const { N, r, p, maxmem } = options; | | 32 | + ({ password, salt, keylen } = options); | | 33 | + | | 34 | + if (typeof callback !== 'function') | | 35 | + throw new ERR_INVALID_CALLBACK(); | | 36 | + | | 37 | + const encoding = getDefaultEncoding(); | | 38 | + const keybuf = Buffer.alloc(keylen); | | 39 | + | | 40 | + const wrap = new AsyncWrap(Providers.SCRYPTREQUEST); | | 41 | + wrap.ondone = (ex) => { // Retains keybuf while request is in flight. | | 42 | + if (ex) return callback.call(wrap, ex); | | 43 | + if (encoding === 'buffer') return callback.call(wrap, null, keybuf); | | 44 | + callback.call(wrap, null, keybuf.toString(encoding)); | | 45 | + }; | | 46 | + | | 47 | + handleError(keybuf, password, salt, N, r, p, maxmem, wrap); | | 48 | +} | | 49 | + | | 50 | +function scryptSync(password, salt, keylen, options = defaults) { | | 51 | + options = check(password, salt, keylen, options); | | 52 | + const { N, r, p, maxmem } = options; | | 53 | + ({ password, salt, keylen } = options); | | 54 | + const keybuf = Buffer.alloc(keylen); | | 55 | + handleError(keybuf, password, salt, N, r, p, maxmem); | | 56 | + const encoding = getDefaultEncoding(); | | 57 | + if (encoding === 'buffer') return keybuf; | | 58 | + return keybuf.toString(encoding); | | 59 | +} | | 60 | + | | 61 | +function handleError(keybuf, password, salt, N, r, p, maxmem, wrap) { | | 62 | + const ex = _scrypt(keybuf, password, salt, N, r, p, maxmem, wrap); | | 63 | + | | 64 | + if (ex === undefined) | | 65 | + return; | | 66 | + | | 67 | + if (ex === null) | | 68 | + throw new ERR_CRYPTO_SCRYPT_INVALID_PARAMETER(); // Bad N, r, p, or maxmem. | | 69 | + | | 70 | + throw ex; // Scrypt operation failed, exception object contains details. | | 71 | +} | | 72 | + | | 73 | +function check(password, salt, keylen, options, callback) { | | 74 | + if (_scrypt === undefined) | | 75 | + throw new ERR_CRYPTO_SCRYPT_NOT_SUPPORTED(); | | 76 | + | | 77 | + password = checkIsArrayBufferView('password', password); | | 78 | + salt = checkIsArrayBufferView('salt', salt); | | 79 | + keylen = checkIsUint('keylen', keylen); | | 80 | + | | 81 | + let { N, r, p, maxmem } = defaults; | | 82 | + if (options && options !== defaults) { | | 83 | + if (options.hasOwnProperty('N')) N = checkIsUint('N', options.N); | | 84 | + if (options.hasOwnProperty('r')) r = checkIsUint('r', options.r); | | 85 | + if (options.hasOwnProperty('p')) p = checkIsUint('p', options.p); | | 86 | + if (options.hasOwnProperty('maxmem')) | | 87 | + maxmem = checkIsUint('maxmem', options.maxmem); | | 88 | + if (N === 0) N = defaults.N; | | 89 | + if (r === 0) r = defaults.r; | | 90 | + if (p === 0) p = defaults.p; | | 91 | + if (maxmem === 0) maxmem = defaults.maxmem; | | 92 | + } | | 93 | + | | 94 | + return { password, salt, keylen, N, r, p, maxmem }; | | 95 | +} | | 96 | + | | 97 | +module.exports = { scrypt, scryptSync }; |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/errors.js +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -503,7 +503,8 @@ E('ERR_CRYPTO_HASH_FINALIZED', 'Digest already called', Error); | 503 | 503 | E('ERR_CRYPTO_HASH_UPDATE_FAILED', 'Hash update failed', Error); | 504 | 504 | E('ERR_CRYPTO_INVALID_DIGEST', 'Invalid digest: %s', TypeError); | 505 | 505 | E('ERR_CRYPTO_INVALID_STATE', 'Invalid state for operation %s', Error); | 506 | | - | | 506 | +E('ERR_CRYPTO_SCRYPT_INVALID_PARAMETER', 'Invalid scrypt parameter', Error); | | 507 | +E('ERR_CRYPTO_SCRYPT_NOT_SUPPORTED', 'Scrypt algorithm not supported', Error); | 507 | 508 | // Switch to TypeError. The current implementation does not seem right. | 508 | 509 | E('ERR_CRYPTO_SIGN_KEY_REQUIRED', 'No key provided to sign', Error); | 509 | 510 | E('ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH', | |
Collapse file Copy file name to clipboardExpand all lines: node.gyp +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 97 | 97 | 'lib/internal/crypto/hash.js', | 98 | 98 | 'lib/internal/crypto/pbkdf2.js', | 99 | 99 | 'lib/internal/crypto/random.js', | | 100 | + 'lib/internal/crypto/scrypt.js', | 100 | 101 | 'lib/internal/crypto/sig.js', | 101 | 102 | 'lib/internal/crypto/util.js', | 102 | 103 | 'lib/internal/constants.js', | |
Collapse file Copy file name to clipboardExpand all lines: src/async_wrap.cc +31Lines changed: 31 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -45,6 +45,7 @@ using v8::PromiseHookType; | 45 | 45 | using v8::PropertyCallbackInfo; | 46 | 46 | using v8::RetainedObjectInfo; | 47 | 47 | using v8::String; | | 48 | +using v8::Uint32; | 48 | 49 | using v8::Undefined; | 49 | 50 | using v8::Value; | 50 | 51 |
| @@ -133,6 +134,23 @@ RetainedObjectInfo* WrapperInfo(uint16_t class_id, Local<Value> wrapper) { | 133 | 134 | // end RetainedAsyncInfo | 134 | 135 |
| 135 | 136 |
| | 137 | +struct AsyncWrapObject : public AsyncWrap { | | 138 | + static inline void New(const FunctionCallbackInfo<Value>& args) { | | 139 | + Environment* env = Environment::GetCurrent(args); | | 140 | + CHECK(args.IsConstructCall()); | | 141 | + CHECK(env->async_wrap_constructor_template()->HasInstance(args.This())); | | 142 | + CHECK(args[0]->IsUint32()); | | 143 | + auto type = static_cast<ProviderType>(args[0].As<Uint32>()->Value()); | | 144 | + new AsyncWrapObject(env, args.This(), type); | | 145 | + } | | 146 | + | | 147 | + inline AsyncWrapObject(Environment* env, Local<Object> object, | | 148 | + ProviderType type) : AsyncWrap(env, object, type) {} | | 149 | + | | 150 | + inline size_t self_size() const override { return sizeof(*this); } | | 151 | +}; | | 152 | + | | 153 | + | 136 | 154 | static void DestroyAsyncIdsCallback(Environment* env, void* data) { | 137 | 155 | Local<Function> fn = env->async_hooks_destroy_function(); | 138 | 156 |
| @@ -569,6 +587,19 @@ void AsyncWrap::Initialize(Local<Object> target, | 569 | 587 | env->set_async_hooks_destroy_function(Local<Function>()); | 570 | 588 | env->set_async_hooks_promise_resolve_function(Local<Function>()); | 571 | 589 | env->set_async_hooks_binding(target); | | 590 | + | | 591 | + { | | 592 | + auto class_name = FIXED_ONE_BYTE_STRING(env->isolate(), "AsyncWrap"); | | 593 | + auto function_template = env->NewFunctionTemplate(AsyncWrapObject::New); | | 594 | + function_template->SetClassName(class_name); | | 595 | + AsyncWrap::AddWrapMethods(env, function_template); | | 596 | + auto instance_template = function_template->InstanceTemplate(); | | 597 | + instance_template->SetInternalFieldCount(1); | | 598 | + auto function = | | 599 | + function_template->GetFunction(env->context()).ToLocalChecked(); | | 600 | + target->Set(env->context(), class_name, function).FromJust(); | | 601 | + env->set_async_wrap_constructor_template(function_template); | | 602 | + } | 572 | 603 | } | 573 | 604 |
| 574 | 605 |
| |
Collapse file Copy file name to clipboardExpand all lines: src/async_wrap.h +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -75,6 +75,7 @@ namespace node { | 75 | 75 | #define NODE_ASYNC_CRYPTO_PROVIDER_TYPES(V) \ | 76 | 76 | V(PBKDF2REQUEST) \ | 77 | 77 | V(RANDOMBYTESREQUEST) \ | | 78 | + V(SCRYPTREQUEST) \ | 78 | 79 | V(TLSWRAP) | 79 | 80 | #else | 80 | 81 | #define NODE_ASYNC_CRYPTO_PROVIDER_TYPES(V) | |
Collapse file Copy file name to clipboardExpand all lines: src/env.h +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -319,6 +319,7 @@ struct PackageConfig { | 319 | 319 | V(async_hooks_destroy_function, v8::Function) \ | 320 | 320 | V(async_hooks_init_function, v8::Function) \ | 321 | 321 | V(async_hooks_promise_resolve_function, v8::Function) \ | | 322 | + V(async_wrap_constructor_template, v8::FunctionTemplate) \ | 322 | 323 | V(buffer_prototype_object, v8::Object) \ | 323 | 324 | V(context, v8::Context) \ | 324 | 325 | V(domain_callback, v8::Function) \ | |
|