Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 
Guillaume Vincent 71d6d59e83 3.1.2 vor 8 Jahren
dist use browesrify to generate lesspass module for browser vor 8 Jahren
src use browesrify to generate lesspass module for browser vor 8 Jahren
tests make encryptLogin function public for the API vor 8 Jahren
.gitignore simplify API for password creation vor 8 Jahren
.npmignore version 1.0.0 on npm vor 8 Jahren
.travis.yml version 1.0.0 on npm vor 8 Jahren
license standardization of sub modules vor 8 Jahren
package.json 3.1.2 vor 8 Jahren
readme.md update documentation vor 8 Jahren

readme.md

Build Status

LessPass Core

core library for LessPass password manager in node.js used to generate unique password

Requirements

  • node 4.x.x

Install

npm install lesspass

Usage

Node

var lesspass = require('lesspass');

var login = 'contact@lesspass.com';
var masterPassword = 'password';
var site = 'lesspass.com';
var options = {
    counter: 1,
    password: {
      length: 12,
      settings: ['lowercase', 'uppercase', 'numbers', 'symbols']
    }
};
lesspass.generatePassword(login, masterPassword, site, options).then(function (generatedPassword) {
    console.log(generatedPassword)  //azYS7,olOL2]
});

Browser

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
</head>
<body>
<script src="lesspass.min.js"></script>
<script>
    var login = 'contact@lesspass.com';
    var masterPassword = 'password';
    var site = 'lesspass.com';
    var options = {
        counter: 1,
        password: {
            length: 12,
            settings: ['lowercase', 'uppercase', 'numbers', 'symbols']
        }
    };
    lesspass.generatePassword(login, masterPassword, site, options).then(function (generatedPassword) {
        console.log(generatedPassword) //azYS7,olOL2]
    });
</script>
</body>
</html>

API

generatePassword(login, masterPassword, site, options)

generate unique password based on login, masterPassword, site and options.

paramaters :

  • login: string
  • masterPassword: string
  • site: string
  • option: dict with lesspass options
    • counter: integer (default: 1)
    • password.length: integer between 6 and 64 (default: 12)
    • password.settings: array of string in lowercase, uppercase, numbers or symbols (default: ['lowercase', 'uppercase', 'numbers', 'symbols'])

exemple :

 var options = {
    counter: 2,
    password: {
        length: 14,
        settings: ['lowercase', 'uppercase', 'numbers']
    }
};

return:

  • promise with generated password

    lesspass.generatePassword(login, masterPassword, site, options) .then(function (generatedPassword) { console.log(generatedPassword); }) .catch(function (error) { console.log(error); });

see tests/api.tests.js for more examples

Tests

npm test

see LessPass project