| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 106aa47 commit 9374700
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2878,26 +2878,6 @@ An object containing commonly used constants for crypto and security related | |||
| 2878 | 2878 | operations. The specific constants currently defined are described in | |
| 2879 | 2879 | [Crypto constants][]. | |
| 2880 | 2880 | ||
| 2881 | - ### `crypto.DEFAULT_ENCODING` | ||
| 2882 | - | ||
| 2883 | - <!-- YAML | ||
| 2884 | - added: v0.9.3 | ||
| 2885 | - deprecated: v10.0.0 | ||
| 2886 | - --> | ||
| 2887 | - | ||
| 2888 | - > Stability: 0 - Deprecated | ||
| 2889 | - | ||
| 2890 | - The default encoding to use for functions that can take either strings | ||
| 2891 | - or [buffers][`Buffer`]. The default value is `'buffer'`, which makes methods | ||
| 2892 | - default to [`Buffer`][] objects. | ||
| 2893 | - | ||
| 2894 | - The `crypto.DEFAULT_ENCODING` mechanism is provided for backward compatibility | ||
| 2895 | - with legacy programs that expect `'latin1'` to be the default encoding. | ||
| 2896 | - | ||
| 2897 | - New applications should expect the default to be `'buffer'`. | ||
| 2898 | - | ||
| 2899 | - This property is deprecated. | ||
| 2900 | - | ||
| 2901 | 2881 | ### `crypto.fips` | |
| 2902 | 2882 | ||
| 2903 | 2883 | <!-- YAML | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1864,14 +1864,18 @@ bits are allowed. Authentication tags of other lengths are invalid per | |||
| 1864 | 1864 | ||
| 1865 | 1865 | <!-- YAML | |
| 1866 | 1866 | changes: | |
| 1867 | + - version: REPLACEME | ||
| 1868 | + pr-url: https://github.com/nodejs/node/pull/47182 | ||
| 1869 | + description: End-of-Life. | ||
| 1867 | 1870 | - version: v10.0.0 | |
| 1868 | 1871 | pr-url: https://github.com/nodejs/node/pull/18333 | |
| 1869 | 1872 | description: Runtime deprecation. | |
| 1870 | 1873 | --> | |
| 1871 | 1874 | ||
| 1872 | - Type: Runtime | ||
| 1875 | + Type: End-of-Life | ||
| 1873 | 1876 | ||
| 1874 | - The [`crypto.DEFAULT_ENCODING`][] property is deprecated. | ||
| 1877 | + The `crypto.DEFAULT_ENCODING` property only existed for compatibility with | ||
| 1878 | + Node.js releases prior to versions 0.9.3 and has been removed. | ||
| 1875 | 1879 | ||
| 1876 | 1880 | ### DEP0092: Top-level `this` bound to `module.exports` | |
| 1877 | 1881 | ||
@@ -3388,7 +3392,6 @@ be added when a function is bound to an `AsyncResource`. | |||
| 3388 | 3392 | [`console.error()`]: console.md#consoleerrordata-args | |
| 3389 | 3393 | [`console.log()`]: console.md#consolelogdata-args | |
| 3390 | 3394 | [`crypto.Certificate()` constructor]: crypto.md#legacy-api | |
| 3391 | - [`crypto.DEFAULT_ENCODING`]: crypto.md#cryptodefault_encoding | ||
| 3392 | 3395 | [`crypto.createCipher()`]: crypto.md#cryptocreatecipheralgorithm-password-options | |
| 3393 | 3396 | [`crypto.createCipheriv()`]: crypto.md#cryptocreatecipherivalgorithm-key-iv-options | |
| 3394 | 3397 | [`crypto.createDecipher()`]: crypto.md#cryptocreatedecipheralgorithm-password-options | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -114,9 +114,7 @@ const { | |||
| 114 | 114 | const { | |
| 115 | 115 | getCiphers, | |
| 116 | 116 | getCurves, | |
| 117 | - getDefaultEncoding, | ||
| 118 | 117 | getHashes, | |
| 119 | - setDefaultEncoding, | ||
| 120 | 118 | setEngine, | |
| 121 | 119 | secureHeapUsed, | |
| 122 | 120 | } = require('internal/crypto/util'); | |
@@ -356,15 +354,6 @@ ObjectDefineProperties(module.exports, { | |||
| 356 | 354 | get: getFips, | |
| 357 | 355 | set: setFips, | |
| 358 | 356 | }, | |
| 359 | - DEFAULT_ENCODING: { | ||
| 360 | - __proto__: null, | ||
| 361 | - enumerable: false, | ||
| 362 | - configurable: true, | ||
| 363 | - get: deprecate(getDefaultEncoding, | ||
| 364 | - 'crypto.DEFAULT_ENCODING is deprecated.', 'DEP0091'), | ||
| 365 | - set: deprecate(setDefaultEncoding, | ||
| 366 | - 'crypto.DEFAULT_ENCODING is deprecated.', 'DEP0091'), | ||
| 367 | - }, | ||
| 368 | 357 | constants: { | |
| 369 | 358 | __proto__: null, | |
| 370 | 359 | configurable: false, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -74,14 +74,9 @@ const { | |||
| 74 | 74 | const kHandle = Symbol('kHandle'); | |
| 75 | 75 | const kKeyObject = Symbol('kKeyObject'); | |
| 76 | 76 | ||
| 77 | - let defaultEncoding = 'buffer'; | ||
| 78 | - | ||
| 79 | - function setDefaultEncoding(val) { | ||
| 80 | - defaultEncoding = val; | ||
| 81 | - } | ||
| 82 | - | ||
| 77 | + // TODO(tniessen): remove all call sites and this function | ||
| 83 | 78 | function getDefaultEncoding() { | |
| 84 | - return defaultEncoding; | ||
| 79 | + return 'buffer'; | ||
| 85 | 80 | } | |
| 86 | 81 | ||
| 87 | 82 | // This is here because many functions accepted binary strings without | |
@@ -561,7 +556,6 @@ module.exports = { | |||
| 561 | 556 | getHashes, | |
| 562 | 557 | kHandle, | |
| 563 | 558 | kKeyObject, | |
| 564 | - setDefaultEncoding, | ||
| 565 | 559 | setEngine, | |
| 566 | 560 | toBuf, | |
| 567 | 561 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,8 +29,6 @@ const crypto = require('crypto'); | |||
| 29 | 29 | const { inspect } = require('util'); | |
| 30 | 30 | const fixtures = require('../common/fixtures'); | |
| 31 | 31 | ||
| 32 | - crypto.DEFAULT_ENCODING = 'buffer'; | ||
| 33 | - | ||
| 34 | 32 | // | |
| 35 | 33 | // Test authenticated encryption modes. | |
| 36 | 34 | // | |
@@ -74,7 +72,6 @@ const expectedWarnings = common.hasFipsCrypto ? | |||
| 74 | 72 | ]; | |
| 75 | 73 | ||
| 76 | 74 | const expectedDeprecationWarnings = [ | |
| 77 | - ['crypto.DEFAULT_ENCODING is deprecated.', 'DEP0091'], | ||
| 78 | 75 | ['crypto.createCipher is deprecated.', 'DEP0106'], | |
| 79 | 76 | ]; | |
| 80 | 77 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments