Skip to content

crypto: deprecate useless authentication tag APIs

These APIs were probably exposed by accident (maybe Cipher and Decipher had the same prototype at some point?). getAuthTag and setAuthTag are not a usual getter/setter pair: Getting the authentication tag only makes sense in the context of encryption, setting it only makes sense in the context of encryption. Currently, both functions throw. Neither has been documented publicly.

It seems appropriate to skip a documentation-only deprecation here since the functions have never been documented, at least not on these classes, and using them will only throw an error. The deprecation warning is triggered on property access, not just when calling the function, to make sure that people don't rely on the mere existence of the functions.

cc @nodejs/crypto @nodejs/security @nodejs/tsc

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading