You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 年之前
8 年之前
8 年之前
8 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. [![Build Status](https://travis-ci.org/lesspass/core.svg?branch=master)](https://travis-ci.org/lesspass/core)
  2. > core library for LessPass password manager in javascript used to generate unique password.
  3. ## Requirements
  4. - node LTS v6
  5. ## Install
  6. npm install lesspass
  7. ## Usage
  8. var LessPass = require('lesspass');
  9. var site = 'lesspass.com';
  10. var login = 'contact@lesspass.com';
  11. var masterPassword = 'password';
  12. var options = {
  13. counter: 1,
  14. length: 12,
  15. lowercase: true,
  16. uppercase: true,
  17. numbers: true,
  18. symbols: true,
  19. template: 'vcVCns'
  20. };
  21. LessPass.encryptLogin(login, masterPassword).then(encryptedLogin => {
  22. LessPass.renderPassword(encryptedLogin, site, options).then(generatedPassword => {
  23. console.log(generatedPassword); //azYS7,olOL2]
  24. });
  25. });
  26. see [tests/api.tests.js](tests/api.tests.js) for more examples
  27. ## Tests
  28. npm test
  29. ## License
  30. This project is licensed under the terms of the GNU GPLv3.
  31. ## Issues
  32. report issues on [LessPass project](https://github.com/lesspass/lesspass/issues)