From cd50e93307774089e003f9ced9c894453b020903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sat, 6 Feb 2021 16:51:50 +0100 Subject: [PATCH] doc: warn about using strings as inputs in crypto PR-URL: https://github.com/nodejs/node/pull/37248 Reviewed-By: Benjamin Gruenbaum Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen Reviewed-By: Filip Skokan --- doc/api/crypto.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index ef59e8c0d4741f..7cd2dd26f2c3c2 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -537,6 +537,9 @@ of the ciphertext in bytes. See [CCM mode][]. The `decipher.setAAD()` method must be called before [`decipher.update()`][]. +When passing a string as the `buffer`, please consider +[caveats when using strings as inputs to cryptographic APIs][]. + ### `decipher.setAuthTag(buffer[, encoding])`