From dda58d3851d8d9f6e6ea6fee9dd47739e2de42fc Mon Sep 17 00:00:00 2001 From: James M Snell Date: Tue, 23 Jan 2018 15:58:14 -0800 Subject: [PATCH] crypto: runtime deprecate DEFAULT_ENCODING MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Runtime deprecate the crypto.DEFAULT_ENCODING property. This is specifically in preparation for eventual ESM support Refs: https://github.com/nodejs/node/pull/18131 PR-URL: https://github.com/nodejs/node/pull/18333 Reviewed-By: Anna Henningsen Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Matteo Collina Reviewed-By: Minwoo Jung Reviewed-By: Tobias Nießen --- doc/api/crypto.md | 16 ++++++++++------ doc/api/deprecations.md | 8 ++++++++ lib/crypto.js | 6 ++++-- test/parallel/test-crypto-authenticated.js | 2 ++ 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index ce91007640a7ed..5e2af21dab19a5 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -1222,6 +1222,7 @@ related operations. The specific constants currently defined are described in ### crypto.DEFAULT_ENCODING The default encoding to use for functions that can take either strings @@ -1231,8 +1232,9 @@ default to [`Buffer`][] objects. The `crypto.DEFAULT_ENCODING` mechanism is provided for backwards compatibility with legacy programs that expect `'latin1'` to be the default encoding. -New applications should expect the default to be `'buffer'`. This property may -become deprecated in a future Node.js release. +New applications should expect the default to be `'buffer'`. + +This property is deprecated. ### crypto.fips