From d4fd03e67371ef8db8c47d2981bbee9601700034 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Tue, 31 Mar 2020 06:51:47 -0400 Subject: [PATCH 1/2] doc: fix return type of `crypto.getFips()` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `crypto.getFips()` returns a number, not a boolean. PR-URL: https://github.com/nodejs/node/pull/32580 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Tobias Nießen Signed-off-by: Richard Lau --- doc/api/crypto.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index e5a271ad6d758e..351f32c11f6220 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -2308,8 +2308,8 @@ console.log(aliceSecret === bobSecret); added: v10.0.0 --> -* Returns: {boolean} `true` if and only if a FIPS compliant crypto provider is - currently in use. +* Returns: {number} `1` if and only if a FIPS compliant crypto provider is + currently in use, `0` otherwise. ### `crypto.getHashes()` * Returns: {number} `1` if and only if a FIPS compliant crypto provider is - currently in use, `0` otherwise. + currently in use, `0` otherwise. A future semver-major release may change + the return type of this API to a {boolean}. ### `crypto.getHashes()`