From 503fd55a35ce056d636c15811c07b51126af271a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Mon, 27 Aug 2018 13:44:19 +0200 Subject: [PATCH] crypto: make _toBuf non-enumerable PR-URL: https://github.com/nodejs/node/pull/22551 Refs: https://github.com/nodejs/node/pull/22501 Reviewed-By: Colin Ihrig Reviewed-By: Sakthipriyan Vairamani Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Anna Henningsen --- lib/crypto.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/crypto.js b/lib/crypto.js index ecf0c4d10b6..569261030b3 100644 --- a/lib/crypto.js +++ b/lib/crypto.js @@ -137,7 +137,6 @@ function createVerify(algorithm, options) { module.exports = exports = { // Methods - _toBuf: deprecate(toBuf, 'crypto._toBuf is deprecated.', 'DEP0114'), createCipheriv, createDecipheriv, createDiffieHellman, @@ -202,6 +201,10 @@ function getFipsForced() { } Object.defineProperties(exports, { + _toBuf: { + enumerable: false, + value: deprecate(toBuf, 'crypto._toBuf is deprecated.', 'DEP0114') + }, createCipher: { enumerable: false, value: deprecate(createCipher,