ps

password-safe

Node module to read and write 'Password Safe Database' files

Showing:

Popularity

Downloads/wk

4

GitHub Stars

3

Maintenance

Last Commit

7yrs ago

Contributors

1

Package

Dependencies

5

Size (min+gzip)

52.5KB

License

Type Definitions

Tree-Shakeable

No?

Categories

Readme

password-safe

Read and write 'Password Safe Database'. Write support not implemented yet.

build status

example

load.js

var PasswordSafe = require('password-safe');
var PasswordDb = require('fs').readFileSync('my.psafe3');

var Safe = new PasswordSafe({
    password: 'dbPassword',
});

Safe.load(PasswordDb, function(err, headerRecord, databaseRecords) {
    for (var i = 0; i < databaseRecords.length; i++) {
        var record = databaseRecords[i];
        console.log("Username: " + record.getUsername());
        console.log("Password: " + record.getPassword());
        console.log("-----------------");
    }
}

Output

Username: myusername1
Password: mypassword1
-----------------
Username: myusername2
Password: mypassword2
-----------------

store.js

var PasswordSafe = require('password-safe');
var PasswordDb = require('fs').readFileSync('my.psafe3');

var Safe = new PasswordSafe({
    password: 'dbPassword',
});

var headerRecord = safe.createHeaderRecord();
var databaseRecords = [
    safe.createDatabaseRecord('title1', 'my first password entry')
];
var encryptedData = safe.store(headerRecord, databaseRecords);
fs.writeFile('my_safe.psafe3', encryptedData);

Note: There are some setters missing for the header and database fields.

install

With npm do:

npm install password-safe

to get the command.

license

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100