{"_id":"1password","_rev":"16-56ec9320343eee1c94f6da606c9b4483","name":"1password","description":"Work With 1Password Keychains","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"1password","description":"Work With 1Password Keychains","version":"0.1.0","author":{"name":"George Czabania","email":"george@czabania.com"},"repository":{"type":"git","url":"git://github.com/stayradiated/onepasswordjs.git"},"bugs":{"url":"http://github.com/stayradiated/onepasswordjs/issues"},"main":"js/keychain.js","scripts":{"test":"mocha --compilers coffee:coffee-script tests"},"engines":{"node":">= 0.8.0"},"keywords":["onepassword","cloud","keychain"],"dependencies":{},"devDependencies":{"grunt":"~0.4.0","grunt-contrib-coffee":"~0.5.0","grunt-contrib-watch":"~0.3.1","mocha":"1.7.x"},"_id":"1password@0.1.0","dist":{"shasum":"d77ea4ac490a10d61e0586f1c9e41646d25d8dec","tarball":"https://registry.npmjs.org/1password/-/1password-0.1.0.tgz","integrity":"sha512-axzwpbOFQq2dGUYba/4lvQZvFi/74k7Xoz6+J6x7UWPGy3iawlyQ/C1SvNXNbLDef1mNdZHv0wG+/Sp1SioVdg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGcbPSnY9lQq8MNf6UETI2SnmZzhUxN4aQhrVKR0xgMeAiEAi5eJtorR2TbluFEgIkRJD/bhDTasCf4NdmqEOUQaLDI="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"stayradiated","email":"george@czabania.com"},"maintainers":[{"name":"stayradiated","email":"george@czabania.com"}]},"0.1.1":{"name":"1password","description":"Work With 1Password Keychains","version":"0.1.1","author":{"name":"George Czabania","email":"george@czabania.com"},"repository":{"type":"git","url":"git://github.com/stayradiated/onepasswordjs.git"},"bugs":{"url":"http://github.com/stayradiated/onepasswordjs/issues"},"main":"js/keychain.js","scripts":{"test":"mocha --compilers coffee:coffee-script tests"},"engines":{"node":">= 0.8.0"},"keywords":["onepassword","cloud","keychain"],"dependencies":{},"devDependencies":{"grunt":"~0.4.0","grunt-contrib-coffee":"~0.5.0","grunt-contrib-watch":"~0.3.1","mocha":"1.7.x","grunt-gluejs":"0.0.1"},"_id":"1password@0.1.1","dist":{"shasum":"5074b990e8a0be2cac6273a76be7244ed45fb327","tarball":"https://registry.npmjs.org/1password/-/1password-0.1.1.tgz","integrity":"sha512-A4fggDgiUz0rP8WQ4D3qPg3/GYIzP5DhdilRLg3Xs9vRKvWmr+K4Pkmc7BLywhtsmtfQDS1ASQCXrist5wMl5w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDcK4T4zEOf+DE4qFb+i4RktaVNr5n+Fz6maCSjAz/qBAiBIAPR4TXagc4O1lDL+Hv6B+ZavyqQJZI3lOtzQKX/CUA=="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"stayradiated","email":"george@czabania.com"},"maintainers":[{"name":"stayradiated","email":"george@czabania.com"}]},"0.2.0":{"name":"1password","description":"Work With 1Password Keychains","version":"0.2.0","author":{"name":"George Czabania","email":"george@czabania.com"},"repository":{"type":"git","url":"git://github.com/stayradiated/onepasswordjs.git"},"bugs":{"url":"http://github.com/stayradiated/onepasswordjs/issues"},"main":"js/keychain.js","bin":{"onepass":"./bin/onepass"},"scripts":{"test":"mocha --compilers coffee:coffee-script tests"},"engines":{"node":">= 0.8.0"},"keywords":["onepassword","cloud","keychain"],"dependencies":{"commander":"1.2.x"},"devDependencies":{"mocha":"1.11.x"},"_id":"1password@0.2.0","dist":{"shasum":"d16fc60cf7a91cb0daa46258ad083ee150acc4f2","tarball":"https://registry.npmjs.org/1password/-/1password-0.2.0.tgz","integrity":"sha512-tMt8c13Wm/ahFp2U3bvJZu+38iJD7H++24wg/82s73M+OdWWqMs2s5IYusZAqflEguHC37l3PqY6aNlbwsRtNg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/UzJoPcgpgPhJ1kPTf2sx5VpcjWiYsaarw9kOiFlb5AIhAI48himM1WWGPDT1cvS6RxHmaosXLBP9l9lrx2xFf4bC"}]},"_from":".","_npmVersion":"1.2.25","_npmUser":{"name":"stayradiated","email":"george@czabania.com"},"maintainers":[{"name":"stayradiated","email":"george@czabania.com"}]},"0.2.1":{"name":"1password","description":"Work With 1Password Keychains","version":"0.2.1","author":{"name":"George Czabania","email":"george@czabania.com"},"repository":{"type":"git","url":"git://github.com/stayradiated/onepasswordjs.git"},"bugs":{"url":"http://github.com/stayradiated/onepasswordjs/issues"},"main":"js/keychain.js","bin":{"onepass":"./bin/onepass"},"scripts":{"test":"mocha tests"},"engines":{"node":">= 0.8.0"},"keywords":["onepassword","cloud","keychain"],"dependencies":{"commander":"1.2.x"},"devDependencies":{"mocha":"1.11.x"},"_id":"1password@0.2.1","dist":{"shasum":"46bb799bd37e978099d5551ca990487036e8a6dd","tarball":"https://registry.npmjs.org/1password/-/1password-0.2.1.tgz","integrity":"sha512-4AIkiMO15nXmq90tAH8jAp7howB8obVStz+qSm9smosTUQEn5iTKogjyT7wreOLxZ/yv94XQjm1a3jM4ohVxtQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXWwxaLNOvl9ZTcWn2Kj2lQlGvVPqYLv9mawlcFtu46QIgWrK8cq2J4DyXIsEb2yvZrX6ieMM/XMWKAh+c1HnZWjY="}]},"_from":".","_npmVersion":"1.2.25","_npmUser":{"name":"stayradiated","email":"george@czabania.com"},"maintainers":[{"name":"stayradiated","email":"george@czabania.com"}]},"0.3.0":{"name":"1password","description":"Work With 1Password Keychains","version":"0.3.0","author":{"name":"George Czabania","email":"george@czabania.com"},"repository":{"type":"git","url":"git://github.com/stayradiated/onepasswordjs.git"},"bugs":{"url":"http://github.com/stayradiated/onepasswordjs/issues"},"main":"js/keychain.js","bin":{"onepass":"./bin/onepass"},"scripts":{"test":"mocha -R spec -t 5000 tests"},"engines":{"node":">= 0.8.0"},"keywords":["onepassword","cloud","keychain"],"dependencies":{"commander":"^2.9.0","inquirer":"^3.0.1","lodash":"^4.17.4"},"devDependencies":{"mocha":"^3.2.0"},"gitHead":"9b5b855952c1dda02283cc601e79fc870205a426","homepage":"https://github.com/stayradiated/onepasswordjs#readme","_id":"1password@0.3.0","_shasum":"5faf9139f0842020efbc485073ab253662c9a5e8","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"stayradiated","email":"george@czabania.com"},"dist":{"shasum":"5faf9139f0842020efbc485073ab253662c9a5e8","tarball":"https://registry.npmjs.org/1password/-/1password-0.3.0.tgz","integrity":"sha512-R6AW/i20PnCB/V1QqdjW7lRJ2dNFv+2tw2K3H0bOyreJb6DaYsfKcrLGzJX4qtwPwDpimZYybsGa8T91GD/e+g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICzlVWA84DvbE5Gl4R1Qtwx+JL1Kq543NfX86f3ZmIlcAiEAoYOLKfXM5GyIrFcyAvdIhY7PyyyBlVEJxlOC5gI8Buk="}]},"maintainers":[{"name":"stayradiated","email":"george@czabania.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/1password-0.3.0.tgz_1485651374205_0.3658749780151993"}},"0.4.0":{"name":"1password","description":"Work With 1Password Keychains","version":"0.4.0","author":{"name":"George Czabania","email":"george@czabania.com"},"repository":{"type":"git","url":"git://github.com/stayradiated/onepasswordjs.git"},"bugs":{"url":"http://github.com/stayradiated/onepasswordjs/issues"},"main":"src/keychain.js","bin":{"onepass":"./bin/onepass"},"scripts":{"test":"mocha -R spec -t 5000 tests"},"engines":{"node":">= 0.8.0"},"keywords":["onepassword","cloud","keychain"],"dependencies":{"commander":"^2.9.0","inquirer":"^3.0.1","lodash":"^4.17.4"},"devDependencies":{"mocha":"^3.2.0"},"gitHead":"6f37d31bd5e7e57489885e89ef9df88e8197a2c3","homepage":"https://github.com/stayradiated/onepasswordjs#readme","_id":"1password@0.4.0","_npmVersion":"5.0.3","_nodeVersion":"8.1.2","_npmUser":{"name":"stayradiated","email":"george@czabania.com"},"dist":{"integrity":"sha512-gECmHKPaoR9Mlw2pUwERKMN50F0r0c399qdmPTsCCIluoBmsUnMnxk/aUOxHiYReqSPh/+RwhE4pIoUDieJDTA==","shasum":"f0219fb45e177d25956907ca985d2ac368f31617","tarball":"https://registry.npmjs.org/1password/-/1password-0.4.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGDZgNKbJ2/962/o4BSFSwAXYNvnse7AhdAZBv0Kuw2aAiBEdIXU3IwOrtHeMDpvKcEAtRNqEJQCcE2ZNkyuTpXkVg=="}]},"maintainers":[{"name":"stayradiated","email":"george@czabania.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/1password-0.4.0.tgz_1497759366720_0.7847665711306036"}}},"readme":"# Cloud Keychain for Node.js (v0.2.1)\n\nThis is a small library to make it easy to work with\n  [1Password's](http://agilebits.com/onepassword) .cloudKeychain files.\n\nThis implementation is based on the\n  [official Agile Bits documentation](http://learn.agilebits.com/1Password4/Security/keychain-design.html)\n  and also the python library [OnePasswordPy](http://github.com/roguelazer/onepasswordpy).\n\n*IMPORTANT NOTE*: I am not in any way affiliated with AgileBits, the makers\n  of 1Password. Their software is awesome and you should probably go buy it.\n\nCurrently supported:\n\n- Unlock keychain using Master Password\n- Load items from band_*.js files\n- Unlock item overview, keys and details\n- Create keychains and items\n\nTodo:\n\n- Find out how to calcuate the HMAC of items correctly\n- Actually do something with item data (instead of just handing back the raw\nJSON)\n- Get syncing working.\n- Add memoize pattern to opdata class to speed up item locking when no data has changed.\n\n## Installation\n\n    npm install 1password\n\n\n## How to Use\n\n__Step 1: Open the keychain__\n\n    Keychain = require( '1password' );\n    keychain = new Keychain();\n    keychain.load( './1password.cloudkeychain', function( err ) {\n        console.log( 'Keychain has loaded' ); \n    });\n\n__Step 2: Unlocking the keychain__\n\n    keychain.unlock( 'password' );\n\n    if ( keychain.unlocked ) {\n        console.log( 'Successfully unlocked keychain' );\n    } else {\n        console.log( 'Error: Could not unlock keychain' );\n    }\n\n__Step 3: Get items__\n\n    keychain.eachItem( function( item ) {\n      console.log( item );\n    });\n\n__Step 4: Decrypt item details__\n\n    item = keychain.findItems( 'Facebook' )[0];\n    item.unlockDetails();\n    console.log( item.details );\n\n\n# Main Keychain Methods\n\n## Keychain.create(password, settings)\n\nReturns an empty keychain encrypted using the password specified.\n\n    keychain = Keychain.create( 'password', {\n        passwordHint: 'hint'\n    });\n    profile = keychain.exportProfile();\n    console.log( profile );\n\nThe `settings` parameter is an object and can overwrite any of the default\nvalues. However extra settings cannot be added. The default settings are:\n    \n    settings = {\n      uuid: Crypto.generateUuid(),\n      salt: Crypto.randomBytes(16),\n      createdAt: currentTime,\n      updatedAt: currentTime,\n      iterations: 10000,\n      profileName: 'default',\n      passwordHint: '',\n      lastUpdatedBy: 'Dropbox'\n    };\n\nThis logs the following (indented and trimmed for readibility):\n\n    var profile={\n      \"lastUpdatedBy\": \"Dropbox\",\n      \"updatedAt\": 1362617665,\n      \"profileName\": \"default\",\n      \"salt\": \"W0wV8jBiFnRWmqWDl3vaPA==\",\n      \"passwordHint\": \"hint\",\n      \"masterKey\": \"b3BkYXRhMDEAAQAAAAAAAGnpNQQJuFTg ...\"\n      \"iterations\": 20000,\n      \"uuid\": \"A2C1050B56C89557AC2A0FA230F90174\",\n      \"overviewKey\": \"b3BkYXRhMDFAAAAAAAAAAAbP+65OIhYy ...\",\n      \"createdAt\": 1362617665\n    };\n\n\n# Keychain Instance Methods\n\n## Events\n\nEvents are implemented using the NodeJS EventEmitter. The API is available on\nthe [NodeJS.org website](http://nodejs.org/api/events.html).\n\nTo use the EventEmitter:\n\n    keychain = new Keychain();\n    keychain.event.on('event', function(args) {\n        console.log('Event fired!', args);\n    });\n    keychain.event.emit('event', 'random data');\n\n\n### Event: 'unlock'\n\n    function() { }\n\nWhen the keychain is unlocked.\n\n\n### Event: 'lock:before'\n\n    function (autolock) { }\n\nWhen the keychain is locked. If the keychain was locked automatically by a\ntimer, then `autolock` will be true. Used to run code before the keychain is\nlocked.\n\n### Event: 'lock:after'\n    \n    function (autolock) { }\n\nWhen the keychain is locked. If the keychain was locked automatically by the\ntimer, then `autolock` will be true. Used to run code after the keychain has\nbeen locked.\n\n\n## Loading data from files\n\nLoad keychain data from a file on disk.\n\n### load(filepath, callback)\n\nThis is the main loading function and probably the only one you'll only ever need to use.\n`filepath` points to a `.cloudkeychain` folder and it will go through and load all files it finds using the other functions.\n\n    keychain.load( './1password.cloudkeychain', function(err) {\n        if ( err ) return console.log( err.message );\n        console.log( 'Successfully loaded keychain' );\n    });\n\n### loadProfile(filepath, rawData)\n\nLoads the `profile.js` file data into the keychain.\nIf you already have profile.js then set `rawData` to `true`.\n\n    filename = './1password.cloudkeychain/default/profile.js';\n    keychain.loadProfile( filename );\n\n    // Alternative\n    profileData = readFileContents( filename )\n    keychain.loadProfile( profileData, true )\n\n### loadFolders(filepath)\n\n__Warning: Not yet implemented.__\n\nLoad the `folders.js` file data into the keychain.\n\n    keychain.loadFolders( './1password.cloudkeychain/default/folders.js' );\n\n### loadBands(bands)\n\n`bands` is an array of filepaths pointing to each band file.\n\n    keychain.loadBands([\n      './1password.cloudkeychain/default/band_0.js',\n      './1password.cloudkeychain/default/band_1.js',\n      './1password.cloudkeychain/default/band_2.js'\n    ]);\n\n### loadAttachment(attachments)\n\n__Warning: Not yet implemented__\n\n`attachments` is an array of filepaths pointing to each band file.\n\n    keychain.loadAttachments([\n      './1password.cloudkeychain/default/026AA7B7333B4F925F16DE9E21B912B7_5754B83288A34CD39DE64B45C2F05A9D.attachment',\n      './1password.cloudkeychain/default/6F8CDF100CC99FD55053B77492D97487_072A1462CBDE4E2488FB2DA16D96B84B.attachment'\n    ]);\n\n\n## Unlocking data\n\nHandle the keychain unlocked status.\n\n### unlock(password)\n\nUnlock the keychain's master and overview keys using `password`.\nIt will automatically lock itself after 60 seconds, unless `rescheduleAutoLock` is called.\n\n    status = keychain.unlock( 'password' );\n    console.log( 'Keychain was unlocked successfully: ' + status );\n\n### lock()\n\nLock the keychain.\nThis will dump the contents of all decrypted data, returning the state back to when the keychain was originally locked.\n\n    keychain.lock();\n\n### rescheduleAutoLock()\n\nThis will reschedule the autolock time.\nIt should only be called when the user does something importantt in the app.\n\n    keychain.rescheduleAutoLock()\n\n\n### changePassword(currentPassword, newPassword)\n\n__Warning: Not yet tested__\n\nThis function will regenerate the master and overview keys using `newPassword`.\nThe `currentPassword` is required, as it is not stored in memory for security\nreasons.\n\n    keychain.changePassword( 'fred', 'phil' );\n\n\n## Items\n\nWorking with items.\n\n### createItem(data)\n\nCreates a new instance of an item using the information in `data`.\nIt returns the item instance, but it does not add it to the keychain. Use `addItem()` to do that.\n\n    item = keychain.createItem({\n      title: 'Github',\n      username: 'wendyappleseed',\n      password: 'password',\n      url: 'github.com',\n      notes: ''\n    });\n\n### addItem(item)\n\nAdds an item to the keychain.\nIf `item` is not an instance of an item, it is turned into one using `new Item(item)`.\n\n    keychain.addItem(item);\n\n### getItem(uuid)\n\nGet an item by its UUID.\n\n    item = keychain.getItem('B1198E4C643E73A6226B89BB600371A9');\n\n### findItems(query)\n\nSearch the keychain for an item by its name or location.\nReturns an array of items.\n\n    items = keychain.findItems('github');\n\n### eachItem(fn)\n\nLoop through all the items in the keychain.\nCalls fn with the arguments `[item]`.\n\n    keychain.eachItem(function(item) {\n      console.log( item );\n    });\n\n\n## Exporting Data\n\nExport keychain data into stringified JSON. Ready for writing to disk.\n\n### exportProfile()\n\nExport the profile.js file.\n\n    profile = keychain.exportProfile();\n    writeFile('profile.js', profile);\n\n### exportBands()\n\nExport the band files (which holds the item data).\nReturns an object.\n\n    bands = keychain.exportBands()\n\n    console.log( bands );\n\n    {\n      \"band_0.js\": \"ld({\\n  \\\"B1198E4C643E73A6226B89BB600371A9\\\": {\\n    \\\"category\\\": \\\"001\\\" ...\",\n      filename: filedata\n    }\n\n\n# Item Instance Methods\n\n### load(data)\nThis is used to load the raw JSON data in a band file into an item.\nFields such as `hmac`, `k`, `o` and `d` are converted from base64.\n\n\titem.load({\n\t\tcategory: '106',\n\t\tcreated: 1361850113,\n\t\td: 'b3BkYXRhMDHlAgAAAAAAANQpT0oUzF1E ...',\n\t\thmac: '/Qzi7Gy37hIV18NgXffDMmt3iPZKVxIFlvvULxf5iCQ=',\n\t\tk: '3OoNrhpqKeBkeVAHTgwXPjlEL++QJAhx ...',\n\t\to: 'b3BkYXRhMDElAAAAAAAAAEfvS1hvP9Ue …',\n\t\ttx: 1361857114,\n\t\tupdated: 1361857114,\n\t\tuuid: 'F11FC7E27E3645D09D2670F04EF5F252'\n\t});\n\n### lock(type)\nLock the item by deleting secure information such as the item keys, overview data and details.\n\n    console.log( item.overview ); // {...} Overview data\n    item.lock('overview');\n    console.log( item.overview ); // undefined\n\n\n### unlock(type)\nUnlock the item by decrypting secure information such as the item keys, overview data and details.\n\n    details = item.unlock('details')\n\n### encrypt(type)\nEncrypt item details.\n\n    item.unlock('details');\n    item.details.data = true;\n    item.encrypt('details');\n    item.lock('details');\n\n### toJSON()\nExport an item into a JSON object that can be saved in a band file.\n\n    json = item.toJSON();\n\n### match(query)\nCheck if an item matches a query. Useful for searching through a keychain. It checks the title and URL of the item and is case insensitive.\n\n    item.overview.title == 'Facebook';\n    item.match('facebook'); // true\n    item.match('book');     // true\n    item.match('skype');    // false\n\n\n\n## Compiling\n\nTo compile the coffeescript into javascript use `cake`:\n\n    cake build\n\n## Tests\n\nTests are written in JavaScript using [Mocha](http://visionmedia.github.com/mocha/).\nTo run the tests\n\n    sudo npm install -g mocha\n    mocha tests\n\nOr if you don't want to install mocha globally:\n\n    npm install .\n    cake tests\n\n_Also remember to recompile the coffeescript before testing!_\n\nLicense\n-------\nThis work is licensed under the ISC license.\n","maintainers":[{"name":"stayradiated","email":"george@czabania.com"}],"time":{"modified":"2022-06-12T14:06:17.711Z","created":"2013-03-05T05:28:16.146Z","0.1.0":"2013-03-05T05:31:38.100Z","0.1.1":"2013-03-15T05:25:46.021Z","0.2.0":"2013-06-28T04:20:35.720Z","0.2.1":"2013-06-28T04:29:11.063Z","0.3.0":"2017-01-29T00:56:16.300Z","0.4.0":"2017-06-18T04:16:06.928Z"},"author":{"name":"George Czabania","email":"george@czabania.com"},"repository":{"type":"git","url":"git://github.com/stayradiated/onepasswordjs.git"},"users":{"kennydude":true,"shanewholloway":true},"homepage":"https://github.com/stayradiated/onepasswordjs#readme","keywords":["onepassword","cloud","keychain"],"bugs":{"url":"http://github.com/stayradiated/onepasswordjs/issues"},"readmeFilename":"README.md"}