From 079acccb563ba5b3888e40f59037dc5fa3ba5bbd Mon Sep 17 00:00:00 2001 From: not-an-aardvark Date: Tue, 23 Aug 2016 22:49:22 -0400 Subject: 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 Reviewed-By: Anna Henningsen --- lib/crypto.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/crypto.js') 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, -- cgit v1.2.3