summaryrefslogtreecommitdiff
path: root/lib/crypto.js
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2020-09-26 19:20:03 -0700
committerJames M Snell <jasnell@gmail.com>2020-10-13 09:30:53 -0700
commit095be6a01f57d5b730a01f131bab4968d3b3b0ba (patch)
tree3bd7569dffc677b1cf64a501c0edfdecc4e5b211 /lib/crypto.js
parentadf8f3d1fee3850b2eaa227a74e45a6a27af61ac (diff)
downloadnode-new-095be6a01f57d5b730a01f131bab4968d3b3b0ba.tar.gz
crypto: add getCipherInfo method
Simple method for retrieving basic information about a cipher (such as block length, expected or default iv length, key length, etc) Signed-off-by: James M Snell <jasnell@gmail.com> Fixes: https://github.com/nodejs/node/issues/22304 PR-URL: https://github.com/nodejs/node/pull/35368 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'lib/crypto.js')
-rw-r--r--lib/crypto.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/crypto.js b/lib/crypto.js
index 736f732abc..0179242e84 100644
--- a/lib/crypto.js
+++ b/lib/crypto.js
@@ -93,7 +93,8 @@ const {
privateDecrypt,
privateEncrypt,
publicDecrypt,
- publicEncrypt
+ publicEncrypt,
+ getCipherInfo,
} = require('internal/crypto/cipher');
const {
Sign,
@@ -178,6 +179,7 @@ module.exports = {
createVerify,
diffieHellman,
getCiphers,
+ getCipherInfo,
getCurves,
getDiffieHellman: createDiffieHellmanGroup,
getHashes,