Skip to content
Laurin Neff edited this page May 10, 2019 · 2 revisions

Classes

PasswordDB

Contains multiple site object and utility functions

Site

Contains username, email and passwords of a user

PasswordDB

Contains multiple site object and utility functions

Kind: global class

new PasswordDB(encrypted, password, options)

Create a new password database when no arguments given, otherwise decrypt one

Param Type Description
encrypted object The encrypted object
password string The encryption algorithm
options object Custom crypto-json options

passwordDB.getSite(name) ⇒ Site

Get a site object in the database

Kind: instance method of PasswordDB
Returns: Site - The site object

Param Type Description
name string The name of the site

passwordDB.addSite(name, site)

Add a new site

Kind: instance method of PasswordDB

Param Type Description
name string The name of the site
site Site The site to add to the database

passwordDB.listSites() ⇒ Array.<string>

Get a list of sites in the database

Kind: instance method of PasswordDB
Returns: Array.<string> - Array of site names

passwordDB.encrypt(password, options) ⇒ object

Encrypt the database for saving

Kind: instance method of PasswordDB
Returns: object - Encrypted database object

Param Type Description
password string The encryption password
options object Custom crypto-json options

Site

Contains username, email and passwords of a user

Kind: global class

new Site(username, email, password)

Create a new site object

Param Type Description
username string The username, empty string if not specified
email string The E-Mail address, empty string if not specified
password string The password, empty string if not specified

site.getUsername() ⇒ string

Get the username

Kind: instance method of Site
Returns: string - username

site.getEmail() ⇒ string

Get the E-Mail

Kind: instance method of Site
Returns: string - E-Mail

site.getPassword() ⇒ string

Get the password

Kind: instance method of Site
Returns: string - password