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:
Diffstat (limited to 'lib/crypto.js')
-rw-r--r--lib/crypto.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/crypto.js b/lib/crypto.js
index 89bafdfddd4..3e440a61fcd 100644
--- a/lib/crypto.js
+++ b/lib/crypto.js
@@ -33,7 +33,7 @@ function toBuf(str, encoding) {
if (typeof str === 'string') {
if (encoding === 'buffer' || !encoding)
encoding = 'utf8';
- return new Buffer(str, encoding);
+ return Buffer.from(str, encoding);
}
return str;
}