diff options
author | not-an-aardvark <not-an-aardvark@users.noreply.github.com> | 2016-08-23 22:49:22 -0400 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2016-09-07 16:29:41 -0700 |
commit | 079acccb563ba5b3888e40f59037dc5fa3ba5bbd (patch) | |
tree | c7f21d6c3040889a1845046a837eefa6f25b0ae2 /lib/crypto.js | |
parent | c436437d3e5649d5e90fe2b9ff5def53f2eee224 (diff) | |
download | android-node-v8-079acccb563ba5b3888e40f59037dc5fa3ba5bbd.tar.gz android-node-v8-079acccb563ba5b3888e40f59037dc5fa3ba5bbd.tar.bz2 android-node-v8-079acccb563ba5b3888e40f59037dc5fa3ba5bbd.zip |
crypto: add crypto.timingSafeEqual()
Reinstate crypto.timingSafeEqual() which was reverted due to test
issues. The flaky test issues are resolved in this new changeset.
PR-URL: https://github.com/nodejs/node/pull/8304
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'lib/crypto.js')
-rw-r--r-- | lib/crypto.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/crypto.js b/lib/crypto.js index 16a8524f84..aa5a7d0cc9 100644 --- a/lib/crypto.js +++ b/lib/crypto.js @@ -16,6 +16,7 @@ const getHashes = binding.getHashes; const getCurves = binding.getCurves; const getFipsCrypto = binding.getFipsCrypto; const setFipsCrypto = binding.setFipsCrypto; +const timingSafeEqual = binding.timingSafeEqual; const Buffer = require('buffer').Buffer; const stream = require('stream'); @@ -649,6 +650,8 @@ Object.defineProperty(exports, 'fips', { set: setFipsCrypto }); +exports.timingSafeEqual = timingSafeEqual; + // Legacy API Object.defineProperty(exports, 'createCredentials', { configurable: true, |