crypto: remove deprecated crypto._toBuf · nodejs/node@bf3cb3f (original) (raw)
3 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -2167,15 +2167,18 @@ release. | ||
2167 | 2167 | ### DEP0114: crypto._toBuf() |
2168 | 2168 | <!-- YAML |
2169 | 2169 | changes: |
2170 | + - version: REPLACEME | |
2171 | + pr-url: https://github.com/nodejs/node/pull/??? | |
2172 | + description: End-of-Life. | |
2170 | 2173 | - version: v11.0.0 |
2171 | 2174 | pr-url: https://github.com/nodejs/node/pull/22501 |
2172 | 2175 | description: Runtime deprecation. |
2173 | 2176 | --> |
2174 | 2177 | |
2175 | -Type: Runtime | |
2178 | +Type: End-Of-Life | |
2176 | 2179 | |
2177 | 2180 | The `crypto._toBuf()` function was not designed to be used by modules outside |
2178 | -of Node.js core and will be removed in the future. | |
2181 | +of Node.js core and was removed. | |
2179 | 2182 | |
2180 | 2183 | |
2181 | 2184 | ### DEP0115: crypto.prng(), crypto.pseudoRandomBytes(), crypto.rng() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -94,8 +94,7 @@ const { | ||
94 | 94 | getHashes, |
95 | 95 | setDefaultEncoding, |
96 | 96 | setEngine, |
97 | - timingSafeEqual, | |
98 | - toBuf | |
97 | + timingSafeEqual | |
99 | 98 | } = require('internal/crypto/util'); |
100 | 99 | const Certificate = require('internal/crypto/certificate'); |
101 | 100 | |
@@ -216,10 +215,6 @@ function getFipsForced() { | ||
216 | 215 | } |
217 | 216 | |
218 | 217 | Object.defineProperties(exports, { |
219 | -_toBuf: { | |
220 | -enumerable: false, | |
221 | -value: deprecate(toBuf, 'crypto._toBuf is deprecated.', 'DEP0114') | |
222 | -}, | |
223 | 218 | createCipher: { |
224 | 219 | enumerable: false, |
225 | 220 | value: deprecate(createCipher, |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -27,8 +27,7 @@ if (!common.hasCrypto) | ||
27 | 27 | |
28 | 28 | common.expectWarning({ |
29 | 29 | DeprecationWarning: [ |
30 | -['crypto.createCipher is deprecated.', 'DEP0106'], | |
31 | -['crypto._toBuf is deprecated.', 'DEP0114'] | |
30 | +['crypto.createCipher is deprecated.', 'DEP0106'] | |
32 | 31 | ] |
33 | 32 | }); |
34 | 33 | |
@@ -301,8 +300,3 @@ testEncoding({ | ||
301 | 300 | testEncoding({ |
302 | 301 | defaultEncoding: 'latin1' |
303 | 302 | }, assertionHashLatin1); |
304 | - | |
305 | -{ | |
306 | -// Test that the exported _toBuf function is deprecated. | |
307 | -crypto._toBuf(Buffer.alloc(0)); | |
308 | -} |