lib/index.js
function getContents(masterPassword) {
    var encryptedContents = file.readFile();
    try {
        var contents = encryption.decrypt(encryptedContents, masterPassword);
        return JSON.parse(contents);
    } catch(err) {
        console.log(err);
        throw new Error("Error reading file contents. This most likely means the provided password is wrong.");
    }
}
function getContents(masterPassword) {
    var encryptedContents = file.readFile();
    try {
        var contents = encryption.decrypt(encryptedContents, masterPassword);
        return JSON.parse(contents);
    } catch(err) {
        console.log(err);
        throw new Error("Error reading file contents. This most likely means the provided password is wrong.");
    }
}
function getContents ( masterPassword ) { var encryptedContents = file . readFile ( ) ; try { var contents = encryption . decrypt ( encryptedContents , masterPassword ) ; return JSON . parse ( contents ) ; } catch ( err ) { console . log ( err ) ; throw new Error ( "Error reading file contents. This most likely means the provided password is wrong." ) ; } }
Read object out of safetext, must include master password.
@param masterPassword
@returns {Promise.<TResult>}
Read object out of safetext must include master password .