From 02794899e86cd1af470ed631018cf708eced0330 Mon Sep 17 00:00:00 2001 From: Guillaume Vincent Date: Wed, 29 Mar 2017 09:46:42 +0200 Subject: [PATCH] variable "index" should be "counter" fix https://github.com/lesspass/lesspass/issues/178 --- src/lesspass.js | 2 +- tests/v2/api.tests.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lesspass.js b/src/lesspass.js index 9d3c1da..86a377d 100644 --- a/src/lesspass.js +++ b/src/lesspass.js @@ -36,7 +36,7 @@ var defaultPasswordProfile = { keylen: 32, digest: 'sha256', length: 16, - index: 1, + counter: 1, iterations: 100000 }; diff --git a/tests/v2/api.tests.js b/tests/v2/api.tests.js index d6e988d..e6ffcb1 100644 --- a/tests/v2/api.tests.js +++ b/tests/v2/api.tests.js @@ -74,6 +74,15 @@ describe('LessPass v2', function() { assert.equal("sB>{qF}wN%/-fm", generatedPassword); }); }); + it('render password with default options', function() { + this.timeout(10000); + var site = 'example.org'; + var login = 'contact@example.org'; + var masterPassword = 'password'; + return LessPass.generatePassword(site, login, masterPassword).then(function(generatedPassword) { + assert.equal('WHLpUL)e00[iHR+w', generatedPassword); + }); + }); }); });