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 година
1234567891011121314151617181920212223242526272829303132333435
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <script src="../lib/lesspass.js"></script>
  6. </head>
  7. <body>
  8. <script>
  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)
  22. .then(encryptedLogin => {
  23. LessPass.renderPassword(encryptedLogin, site, options).then(generatedPassword => {
  24. console.log(generatedPassword); //azYS7,olOL2]
  25. document.body.innerHTML = document.body.innerHTML + "<br>generated password : " + generatedPassword
  26. });
  27. });
  28. LessPass.createFingerprint('password').then(fingerprint => {
  29. document.body.innerHTML = document.body.innerHTML + "fingerprint : " + fingerprint
  30. });
  31. </script>
  32. </body>
  33. </html>