From bec4264fcf51cb346a6136ec87f45854a7159774 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 2 Feb 2017 11:34:35 -0800 Subject: [PATCH] crypto: remove async functions. --- lib/crypto/crypto.js | 52 -------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/lib/crypto/crypto.js b/lib/crypto/crypto.js index e90ae601..a28b6b5d 100644 --- a/lib/crypto/crypto.js +++ b/lib/crypto/crypto.js @@ -23,16 +23,6 @@ var crypto = exports; crypto.hash = backend.hash; -/** - * Hash with chosen algorithm (async). - * @function - * @param {String} alg - * @param {Buffer} data - * @returns {Buffer} - */ - -crypto.hashAsync = backend.hashAsync; - /** * Hash with ripemd160. * @function @@ -78,15 +68,6 @@ crypto.hash160 = backend.hash160; crypto.hash256 = backend.hash256; -/** - * Hash with sha256 twice (async). - * @function - * @param {Buffer} data - * @returns {Buffer} - */ - -crypto.hash256Async = backend.hash256Async; - /** * Create an HMAC. * @function @@ -98,17 +79,6 @@ crypto.hash256Async = backend.hash256Async; crypto.hmac = backend.hmac; -/** - * Create an HMAC (async). - * @function - * @param {String} alg - * @param {Buffer} data - * @param {Buffer} key - * @returns {Buffer} HMAC - */ - -crypto.hmacAsync = backend.hmacAsync; - /** * Perform key derivation using PBKDF2. * @function @@ -349,17 +319,6 @@ if (native) crypto.encipher = backend.encipher; -/** - * Encrypt with aes-256-cbc (async). - * @function - * @param {Buffer} data - * @param {Buffer} key - 256 bit key. - * @param {Buffer} iv - 128 bit initialization vector. - * @returns {Promise} - */ - -crypto.encipherAsync = backend.encipherAsync; - /** * Decrypt with aes-256-cbc. * @function @@ -371,17 +330,6 @@ crypto.encipherAsync = backend.encipherAsync; crypto.decipher = backend.decipher; -/** - * Decrypt with aes-256-cbc (async). - * @function - * @param {Buffer} data - * @param {Buffer} key - 256 bit key. - * @param {Buffer} iv - 128 bit initialization vector. - * @returns {Promise} - */ - -crypto.decipherAsync = backend.decipherAsync; - /** * memcmp in constant time (can only return true or false). * This protects us against timing attacks when