diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-10-01 13:59:25 +0200 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-10-03 13:54:36 -0700 |
commit | 389969ea9247a7bb12d5e595879a7f0f05357dc5 (patch) | |
tree | dc3499231f8072aa289c6af3d34e5cc6f6593164 /test/parallel/test-crypto-hmac.js | |
parent | 500720f5781b96147422614b82c1f85e22d6a6e8 (diff) | |
download | android-node-v8-389969ea9247a7bb12d5e595879a7f0f05357dc5.tar.gz android-node-v8-389969ea9247a7bb12d5e595879a7f0f05357dc5.tar.bz2 android-node-v8-389969ea9247a7bb12d5e595879a7f0f05357dc5.zip |
crypto: remove arbitrary UTF16 restriction
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 <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Diffstat (limited to 'test/parallel/test-crypto-hmac.js')
-rw-r--r-- | test/parallel/test-crypto-hmac.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/parallel/test-crypto-hmac.js b/test/parallel/test-crypto-hmac.js index 21ff3b0b04..2601994ab1 100644 --- a/test/parallel/test-crypto-hmac.js +++ b/test/parallel/test-crypto-hmac.js @@ -408,12 +408,9 @@ const rfc2202_sha1 = [ for (const { key, data, hmac } of rfc2202_sha1) testHmac('sha1', key, data, hmac); -common.expectsError( - () => crypto.createHmac('sha256', 'w00t').digest('ucs2'), - { - code: 'ERR_CRYPTO_HASH_DIGEST_NO_UTF16', - type: Error - }); +assert.strictEqual( + crypto.createHmac('sha256', 'w00t').digest('ucs2'), + crypto.createHmac('sha256', 'w00t').digest().toString('ucs2')); // Check initialized -> uninitialized state transition after calling digest(). { |