您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

20 行
519 B

  1. var lesspass = require('../lib/index');
  2. var assert = require('assert');
  3. var site = 'lesspass.com';
  4. var login = 'contact@lesspass.com';
  5. var masterPassword = 'password';
  6. var options = {
  7. counter: 1,
  8. length: 12,
  9. lowercase: true,
  10. uppercase: true,
  11. numbers: true,
  12. symbols: true
  13. };
  14. lesspass.encryptLogin(login, masterPassword).then(function (encryptedLogin) {
  15. var generatedPassword = lesspass.deriveEncryptedLogin(encryptedLogin, site, options);
  16. assert(generatedPassword, 'azYS7,olOL2]');
  17. });