Guillaume Vincent 3262938209 | pirms 7 gadiem | |
---|---|---|
dist | pirms 7 gadiem | |
example | pirms 7 gadiem | |
src | pirms 7 gadiem | |
test | pirms 7 gadiem | |
.editorconfig | pirms 7 gadiem | |
.gitignore | pirms 8 gadiem | |
.travis.yml | pirms 7 gadiem | |
LICENSE | pirms 8 gadiem | |
README.md | pirms 7 gadiem | |
package-lock.json | pirms 7 gadiem | |
package.json | pirms 7 gadiem |
npm core library used to generate LessPass passwords
npm install lesspass
var profile = {
site: 'example.org',
login: 'contact@example.org'
}
var masterPassword = 'password';
LessPass.generatePassword(profile, masterPassword)
.then(function (generatedPassword) {
console.log(generatedPassword); // WHLpUL)e00[iHR+w
});
see tests/api.tests.js for more examples
generate LessPass password
var profile = {
site: 'example.org',
login: 'contact@example.org'
options: {
uppercase: true,
lowercase: true,
digits: true,
symbols: true,
length: 16,
counter: 1
},
crypto: {
method: 'pbkdf2',
iterations: 100000,
keylen: 32,
digest: "sha256"
}
};
var masterPassword = 'password';
LessPass.generatePassword(profile, masterPassword)
.then(function (generatedPassword) {
console.log(generatedPassword); // WHLpUL)e00[iHR+w
});
create a fingerprint
LessPass.createFingerprint('password').then(fingerprint => {
console.log(fingerprint); //e56a207acd1e6714735487c199c6f095844b7cc8e5971d86c003a7b6f36ef51e
});
test if LessPass is supported
LessPass.isSupported().then(function(isSupported) {
if (isSupported) {
console.log("LessPass is supported");
}
else {
console.log("LessPass is not supported");
}
});
npm test
This project is licensed under the terms of the GNU GPLv3.
report issues on LessPass project