[Pkg-javascript-commits] [node-evp-bytestokey] 15/29: tests: output base64 if reproducing is required

Bastien Roucariès rouca at moszumanska.debian.org
Fri Sep 8 09:56:50 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-evp-bytestokey.

commit 462df597400d95c15a79c308af0f5820a04c3cb0
Author: Daniel Cousens <github at dcousens.com>
Date:   Mon Aug 21 23:37:12 2017 +1000

    tests: output base64 if reproducing is required
---
 test/index.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/index.js b/test/index.js
index d78d99c..86fcac1 100644
--- a/test/index.js
+++ b/test/index.js
@@ -19,14 +19,14 @@ for (var i = 0; i < 1000; ++i) {
   var password = crypto.randomBytes(10 + Math.round(Math.random() * 100))
   var salt = crypto.randomBytes(8)
 
-  test('salt is null', function (t) {
+  test('password: ' + password.toString('base64') + ', salt: null', function (t) {
     var result = EVP_BytesToKey(password, null, keyLen, ivLen)
     var expected = OpenSSL_EVP_BytesToKey.md5_key32_iv16(null, password, 1)
     t.same(result, expected)
     t.end()
   })
 
-  test('salt is not null', function (t) {
+  test('password: ' + password.toString('base64') + ', salt: ' + salt.toString('base64'), function (t) {
     var result = EVP_BytesToKey(password, salt, keyLen, ivLen)
     var expected = OpenSSL_EVP_BytesToKey.md5_key32_iv16(salt, password, 1)
     t.same(result, expected)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-evp-bytestokey.git



More information about the Pkg-javascript-commits mailing list