瀏覽代碼

variable "index" should be "counter"

fix https://github.com/lesspass/lesspass/issues/178
pull/342/head
Guillaume Vincent 7 年之前
父節點
當前提交
02794899e8
共有 2 個檔案被更改,包括 10 行新增1 行删除
  1. +1
    -1
      src/lesspass.js
  2. +9
    -0
      tests/v2/api.tests.js

+ 1
- 1
src/lesspass.js 查看文件

@@ -36,7 +36,7 @@ var defaultPasswordProfile = {
keylen: 32,
digest: 'sha256',
length: 16,
index: 1,
counter: 1,
iterations: 100000
};



+ 9
- 0
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);
});
});
});
});


Loading…
取消
儲存