crypto: remove deprecated crypto._toBuf
PR-URL: https://github.com/nodejs/node/pull/25338 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
3255ae4cd1
commit
bf3cb3f9b1
@ -2167,15 +2167,18 @@ release.
|
||||
### DEP0114: crypto._toBuf()
|
||||
<!-- YAML
|
||||
changes:
|
||||
- version: REPLACEME
|
||||
pr-url: https://github.com/nodejs/node/pull/???
|
||||
description: End-of-Life.
|
||||
- version: v11.0.0
|
||||
pr-url: https://github.com/nodejs/node/pull/22501
|
||||
description: Runtime deprecation.
|
||||
-->
|
||||
|
||||
Type: Runtime
|
||||
Type: End-Of-Life
|
||||
|
||||
The `crypto._toBuf()` function was not designed to be used by modules outside
|
||||
of Node.js core and will be removed in the future.
|
||||
of Node.js core and was removed.
|
||||
|
||||
<a id="DEP0115"></a>
|
||||
### DEP0115: crypto.prng(), crypto.pseudoRandomBytes(), crypto.rng()
|
||||
|
@ -94,8 +94,7 @@ const {
|
||||
getHashes,
|
||||
setDefaultEncoding,
|
||||
setEngine,
|
||||
timingSafeEqual,
|
||||
toBuf
|
||||
timingSafeEqual
|
||||
} = require('internal/crypto/util');
|
||||
const Certificate = require('internal/crypto/certificate');
|
||||
|
||||
@ -216,10 +215,6 @@ function getFipsForced() {
|
||||
}
|
||||
|
||||
Object.defineProperties(exports, {
|
||||
_toBuf: {
|
||||
enumerable: false,
|
||||
value: deprecate(toBuf, 'crypto._toBuf is deprecated.', 'DEP0114')
|
||||
},
|
||||
createCipher: {
|
||||
enumerable: false,
|
||||
value: deprecate(createCipher,
|
||||
|
@ -27,8 +27,7 @@ if (!common.hasCrypto)
|
||||
|
||||
common.expectWarning({
|
||||
DeprecationWarning: [
|
||||
['crypto.createCipher is deprecated.', 'DEP0106'],
|
||||
['crypto._toBuf is deprecated.', 'DEP0114']
|
||||
['crypto.createCipher is deprecated.', 'DEP0106']
|
||||
]
|
||||
});
|
||||
|
||||
@ -301,8 +300,3 @@ testEncoding({
|
||||
testEncoding({
|
||||
defaultEncoding: 'latin1'
|
||||
}, assertionHashLatin1);
|
||||
|
||||
{
|
||||
// Test that the exported _toBuf function is deprecated.
|
||||
crypto._toBuf(Buffer.alloc(0));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user