From ab4c53e0ef6704b6c526bb8ee0cdc9e5aa896c92 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 1 Oct 2019 13:59:25 +0200 Subject: [PATCH] crypto: remove arbitrary UTF16 restriction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since 71f633a32f1f5617, this is no longer necessary. Refs: https://github.com/nodejs/node/pull/22622 Fixes: https://github.com/nodejs/node/issues/29793 PR-URL: https://github.com/nodejs/node/pull/29795 Reviewed-By: Michaƫl Zasso Reviewed-By: Ruben Bridgewater Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: David Carlier --- doc/api/errors.md | 20 ++++++++++++-------- lib/internal/crypto/hash.js | 11 ++++------- lib/internal/errors.js | 2 -- src/node_crypto.cc | 1 - test/parallel/test-crypto-hash.js | 10 +++------- test/parallel/test-crypto-hmac.js | 9 +++------ 6 files changed, 22 insertions(+), 31 deletions(-) diff --git a/doc/api/errors.md b/doc/api/errors.md index f479d06f1456fb..2ba78a95cf2550 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -763,14 +763,6 @@ to enable or disable FIPS mode in the `crypto` module. An attempt was made to enable or disable FIPS mode, but FIPS mode was not available. - -### ERR_CRYPTO_HASH_DIGEST_NO_UTF16 - -The UTF-16 encoding was used with [`hash.digest()`][]. While the -`hash.digest()` method does allow an `encoding` argument to be passed in, -causing the method to return a string rather than a `Buffer`, the UTF-16 -encoding (e.g. `ucs` or `utf16le`) is not supported. - ### ERR_CRYPTO_HASH_FINALIZED @@ -2070,6 +2062,18 @@ removed: v11.12.0 There was an attempt to use a `MessagePort` instance in a closed state, usually after `.close()` has been called. + +### ERR_CRYPTO_HASH_DIGEST_NO_UTF16 + + +The UTF-16 encoding was used with [`hash.digest()`][]. While the +`hash.digest()` method does allow an `encoding` argument to be passed in, +causing the method to return a string rather than a `Buffer`, the UTF-16 +encoding (e.g. `ucs` or `utf16le`) is not supported. + ### ERR_HTTP2_FRAME_ERROR