https://github.com/nozzlegear/keepass.js
A JavaScript library for reading KeePass databases in the browser
https://github.com/nozzlegear/keepass.js
Last synced: 5 months ago
JSON representation
A JavaScript library for reading KeePass databases in the browser
- Host: GitHub
- URL: https://github.com/nozzlegear/keepass.js
- Owner: nozzlegear
- License: mit
- Created: 2015-11-15T03:36:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-15T03:39:13.000Z (almost 10 years ago)
- Last Synced: 2024-05-02T05:56:10.260Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 457 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# keepass.js
[](https://travis-ci.org/ulich/keepass.js) [](https://codeclimate.com/github/ulich/keepass.js/coverage) [](https://codeclimate.com/github/ulich/keepass.js) [](https://david-dm.org/ulich/keepass.js#info=devDependencies)
A JavaScript library for reading KeePass databases in the browser (writing KeePass files is to be implemented).
It uses the Web Cryptography API for high performance and is therefore only working in newer browser versions.
Compared to keepass.io, this library is for the **browser**, keepass.io is written for Node.js which uses APIs that are only availabie in Node.js.
The keepass decryption algorithm is based on: https://github.com/perfectapi/CKP
## Usage
Install the library from bower:
```
bower install keepass.js
```In your webpage:
```htmlvar keepass = new Keepass.Database();
keepass.getPasswords(fileAsArrayBuffer, password, keyFileAsArrayBuffer)
.then(function (entries) {
var entry = entries[0];
console.log(entry.title);
console.log(entry.userName);
var password = keepass.decryptProtectedData(entry.protectedData.password))
console.log(password);
});```
## Available distribution files
The distribution files are in the keepass.js-bower git repository.
file | description
------------------- | -------------------------------------------------------------------------------------------
keepass.js | Contains the code of this project only (you need to include keepass-libs.min.js separately)
keepass.min.js | Minified keepass.js (you need to include keepass-libs.min.js separately)
keepass-libs.min.js | Contains all 3rd party libraries required for keepass.js, minified
keepass-all.min.js | keepass-libs.min.js + keepass.min.js## Building
You must have the following tools installed:
- node.js
- bower (npm install -g bower)Now run
```
npm install
bower install
npm run build
```For development, run `npm run build-watch` instead of `npm run build` to automatically rebuild when changing the source code.
## Running the tests
```
npm test
```