Skip to content

Commit b8018f4

Browse files
committed
crypto: move DEP0113 to End-of-Life
PR-URL: #26249 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent f11e8b9 commit b8018f4

File tree

2 files changed

+7
-25
lines changed

2 files changed

+7
-25
lines changed

doc/api/deprecations.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -2162,17 +2162,18 @@ accessed outside of Node.js core: `Socket.prototype._handle`,
21622162
### DEP0113: Cipher.setAuthTag(), Decipher.getAuthTag()
21632163
<!-- YAML
21642164
changes:
2165+
- version: REPLACEME
2166+
pr-url: https://github.com/nodejs/node/pull/26249
2167+
description: End-of-Life.
21652168
- version: v11.0.0
21662169
pr-url: https://github.com/nodejs/node/pull/22126
21672170
description: Runtime deprecation.
21682171
-->
21692172
2170-
Type: Runtime
2173+
Type: End-of-Life
21712174
2172-
With the current crypto API, having `Cipher.setAuthTag()` and
2173-
`Decipher.getAuthTag()` is not helpful and both functions will throw an error
2174-
when called. They have never been documented and will be removed in a future
2175-
release.
2175+
`Cipher.setAuthTag()` and `Decipher.getAuthTag()` are no longer available. They
2176+
were never documented and would throw when called.
21762177
21772178
<a id="DEP0114"></a>
21782179
### DEP0114: crypto._toBuf()

lib/internal/crypto/cipher.js

+1-20
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const {
3737
const assert = require('internal/assert');
3838
const LazyTransform = require('internal/streams/lazy_transform');
3939

40-
const { deprecate, normalizeEncoding } = require('internal/util');
40+
const { normalizeEncoding } = require('internal/util');
4141

4242
// Lazy loaded for startup performance.
4343
let StringDecoder;
@@ -206,13 +206,6 @@ function setAuthTag(tagbuf) {
206206
return this;
207207
}
208208

209-
Object.defineProperty(Cipher.prototype, 'setAuthTag', {
210-
get: deprecate(() => setAuthTag,
211-
'Cipher.setAuthTag is deprecated and will be removed in a ' +
212-
'future version of Node.js.',
213-
'DEP0113')
214-
});
215-
216209
Cipher.prototype.setAAD = function setAAD(aadbuf, options) {
217210
if (!isArrayBufferView(aadbuf)) {
218211
throw new ERR_INVALID_ARG_TYPE('buffer',
@@ -243,20 +236,8 @@ function addCipherPrototypeFunctions(constructor) {
243236
constructor.prototype.setAutoPadding = Cipher.prototype.setAutoPadding;
244237
if (constructor === Cipheriv) {
245238
constructor.prototype.getAuthTag = Cipher.prototype.getAuthTag;
246-
Object.defineProperty(constructor.prototype, 'setAuthTag', {
247-
get: deprecate(() => setAuthTag,
248-
'Cipher.setAuthTag is deprecated and will be removed in ' +
249-
'a future version of Node.js.',
250-
'DEP0113')
251-
});
252239
} else {
253240
constructor.prototype.setAuthTag = setAuthTag;
254-
Object.defineProperty(constructor.prototype, 'getAuthTag', {
255-
get: deprecate(() => constructor.prototype.getAuthTag,
256-
'Decipher.getAuthTag is deprecated and will be removed ' +
257-
'in a future version of Node.js.',
258-
'DEP0113')
259-
});
260241
}
261242
constructor.prototype.setAAD = Cipher.prototype.setAAD;
262243
}

0 commit comments

Comments
 (0)