From 0716956b446e24f3b653d84c27501b2c7134a8a3 Mon Sep 17 00:00:00 2001 From: Memmie Lenglet Date: Tue, 27 Mar 2018 01:01:53 +0200 Subject: [PATCH] Fix crypto hash update invalid arg type error Force key parts to be String --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 6eeb1e2..3cfb5f7 100644 --- a/index.js +++ b/index.js @@ -196,7 +196,7 @@ ExpressBrute._getKey = function (arr) { var key = ''; _(arr).each(function (part) { if (part) { - key += crypto.createHash('sha256').update(part).digest('base64'); + key += crypto.createHash('sha256').update(String(part)).digest('base64'); } }); return crypto.createHash('sha256').update(key).digest('base64');