135 lines
25 KiB
JSON
135 lines
25 KiB
JSON
|
{
|
||
|
"_args": [
|
||
|
[
|
||
|
{
|
||
|
"raw": "sshpk@^1.7.0",
|
||
|
"scope": null,
|
||
|
"escapedName": "sshpk",
|
||
|
"name": "sshpk",
|
||
|
"rawSpec": "^1.7.0",
|
||
|
"spec": ">=1.7.0 <2.0.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/http-signature"
|
||
|
]
|
||
|
],
|
||
|
"_from": "sshpk@>=1.7.0 <2.0.0",
|
||
|
"_id": "sshpk@1.13.1",
|
||
|
"_inCache": true,
|
||
|
"_location": "/sshpk",
|
||
|
"_nodeVersion": "0.12.18",
|
||
|
"_npmOperationalInternal": {
|
||
|
"host": "s3://npm-registry-packages",
|
||
|
"tmp": "tmp/sshpk-1.13.1.tgz_1496888143718_0.9964376483112574"
|
||
|
},
|
||
|
"_npmUser": {
|
||
|
"name": "arekinath",
|
||
|
"email": "alex@cooperi.net"
|
||
|
},
|
||
|
"_npmVersion": "4.2.0",
|
||
|
"_phantomChildren": {},
|
||
|
"_requested": {
|
||
|
"raw": "sshpk@^1.7.0",
|
||
|
"scope": null,
|
||
|
"escapedName": "sshpk",
|
||
|
"name": "sshpk",
|
||
|
"rawSpec": "^1.7.0",
|
||
|
"spec": ">=1.7.0 <2.0.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"_requiredBy": [
|
||
|
"/http-signature"
|
||
|
],
|
||
|
"_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz",
|
||
|
"_shasum": "512df6da6287144316dc4c18fe1cf1d940739be3",
|
||
|
"_shrinkwrap": null,
|
||
|
"_spec": "sshpk@^1.7.0",
|
||
|
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/http-signature",
|
||
|
"author": {
|
||
|
"name": "Joyent, Inc"
|
||
|
},
|
||
|
"bin": {
|
||
|
"sshpk-conv": "bin/sshpk-conv",
|
||
|
"sshpk-sign": "bin/sshpk-sign",
|
||
|
"sshpk-verify": "bin/sshpk-verify"
|
||
|
},
|
||
|
"bugs": {
|
||
|
"url": "https://github.com/arekinath/node-sshpk/issues"
|
||
|
},
|
||
|
"contributors": [
|
||
|
{
|
||
|
"name": "Dave Eddy",
|
||
|
"email": "dave@daveeddy.com"
|
||
|
},
|
||
|
{
|
||
|
"name": "Mark Cavage",
|
||
|
"email": "mcavage@gmail.com"
|
||
|
},
|
||
|
{
|
||
|
"name": "Alex Wilson",
|
||
|
"email": "alex@cooperi.net"
|
||
|
}
|
||
|
],
|
||
|
"dependencies": {
|
||
|
"asn1": "~0.2.3",
|
||
|
"assert-plus": "^1.0.0",
|
||
|
"bcrypt-pbkdf": "^1.0.0",
|
||
|
"dashdash": "^1.12.0",
|
||
|
"ecc-jsbn": "~0.1.1",
|
||
|
"getpass": "^0.1.1",
|
||
|
"jsbn": "~0.1.0",
|
||
|
"tweetnacl": "~0.14.0"
|
||
|
},
|
||
|
"description": "A library for finding and using SSH public keys",
|
||
|
"devDependencies": {
|
||
|
"benchmark": "^1.0.0",
|
||
|
"sinon": "^1.17.2",
|
||
|
"tape": "^3.5.0",
|
||
|
"temp": "^0.8.2"
|
||
|
},
|
||
|
"directories": {
|
||
|
"bin": "./bin",
|
||
|
"lib": "./lib",
|
||
|
"man": "./man/man1"
|
||
|
},
|
||
|
"dist": {
|
||
|
"shasum": "512df6da6287144316dc4c18fe1cf1d940739be3",
|
||
|
"tarball": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz"
|
||
|
},
|
||
|
"engines": {
|
||
|
"node": ">=0.10.0"
|
||
|
},
|
||
|
"gitHead": "a17ec8861242649038dcdba8f8d7df5edf2ddb8c",
|
||
|
"homepage": "https://github.com/arekinath/node-sshpk#readme",
|
||
|
"license": "MIT",
|
||
|
"main": "lib/index.js",
|
||
|
"maintainers": [
|
||
|
{
|
||
|
"name": "arekinath",
|
||
|
"email": "alex@cooperi.net"
|
||
|
}
|
||
|
],
|
||
|
"man": [
|
||
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/.staging/sshpk-a65daea1/man/man1/sshpk-conv.1",
|
||
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/.staging/sshpk-a65daea1/man/man1/sshpk-sign.1",
|
||
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/.staging/sshpk-a65daea1/man/man1/sshpk-verify.1"
|
||
|
],
|
||
|
"name": "sshpk",
|
||
|
"optionalDependencies": {
|
||
|
"bcrypt-pbkdf": "^1.0.0",
|
||
|
"ecc-jsbn": "~0.1.1",
|
||
|
"jsbn": "~0.1.0",
|
||
|
"tweetnacl": "~0.14.0"
|
||
|
},
|
||
|
"readme": "sshpk\n=========\n\nParse, convert, fingerprint and use SSH keys (both public and private) in pure\nnode -- no `ssh-keygen` or other external dependencies.\n\nSupports RSA, DSA, ECDSA (nistp-\\*) and ED25519 key types, in PEM (PKCS#1, \nPKCS#8) and OpenSSH formats.\n\nThis library has been extracted from\n[`node-http-signature`](https://github.com/joyent/node-http-signature)\n(work by [Mark Cavage](https://github.com/mcavage) and\n[Dave Eddy](https://github.com/bahamas10)) and\n[`node-ssh-fingerprint`](https://github.com/bahamas10/node-ssh-fingerprint)\n(work by Dave Eddy), with additions (including ECDSA support) by\n[Alex Wilson](https://github.com/arekinath).\n\nInstall\n-------\n\n```\nnpm install sshpk\n```\n\nExamples\n--------\n\n```js\nvar sshpk = require('sshpk');\n\nvar fs = require('fs');\n\n/* Read in an OpenSSH-format public key */\nvar keyPub = fs.readFileSync('id_rsa.pub');\nvar key = sshpk.parseKey(keyPub, 'ssh');\n\n/* Get metadata about the key */\nconsole.log('type => %s', key.type);\nconsole.log('size => %d bits', key.size);\nconsole.log('comment => %s', key.comment);\n\n/* Compute key fingerprints, in new OpenSSH (>6.7) format, and old MD5 */\nconsole.log('fingerprint => %s', key.fingerprint().toString());\nconsole.log('old-style fingerprint => %s', key.fingerprint('md5').toString());\n```\n\nExample output:\n\n```\ntype => rsa\nsize => 2048 bits\ncomment => foo@foo.com\nfingerprint => SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w\nold-style fingerprint => a0:c8:ad:6c:32:9a:32:fa:59:cc:a9:8c:0a:0d:6e:bd\n```\n\nMore examples: converting between formats:\n\n```js\n/* Read in a PEM public key */\nvar keyPem = fs.readFileSync('id_rsa.pem');\nvar key = sshpk.parseKey(keyPem, 'pem');\n\n/* Convert to PEM PKCS#8 public key format */\nvar pemBuf = key.toBuffer('pkcs8');\n\n/* Convert to SSH public key format (and return as a string) */\nvar sshKey = key.toString('ssh');\n```\n\nSigning and verifying:\n\n```js\n/* Read in an OpenSSH/PEM *private* key */\nvar keyPriv = fs.readFileSync('id_ecdsa');\nvar key = sshpk.parsePrivateKey(keyPriv, 'pem');\n\nvar data = 'some data';\n\n/* Sign some data with the key */\nvar s = key.createSign('sha1');\ns.update(data);\nvar signature = s.sign();\n\n/* Now load the public key (could also use just key.toPublic()) */\nvar keyPub = fs.readFileSync('id_ecdsa.pub');\nkey = sshpk.parseKey(keyPub, 'ssh');\n\n/* Make a crypto.Verifier with this key */\nvar v = key.createVerify('sha1');\nv.update(data);\nvar valid = v.verify(signature);\n/* => true! */\n```\n\nMatching fingerprints with keys:\n\n```js\nvar fp = sshpk.parseFingerprint('SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w');\n\nvar keys = [sshpk.parseKey(...), sshpk.parseKey(...), ...];\n\nkeys.forEach(function (key) {\n\tif (fp.matches(key))\n\t\tconsole.log('found it!');\n});\n```\n\nUsage\n-----\n\n## Public keys\n\n### `parseKey(data[, format = 'auto'[, options]])`\n\nParses a key from a given data format and returns a new `Key` object.\n\nParameters\n\n- `data` -- Either a Buffer or String, containing the key\n- `format` -- String name of format to use, valid options are:\n - `auto`: choose automatically from all below\n - `pem`: supports both PKCS#1 and PKCS#8\n - `ssh`: standard OpenSSH format,\n - `pkcs1`, `pkcs8`: variants of `pem`\n - `rfc4253`: raw OpenSSH wire format\n - `openssh`: new post-OpenSSH 6.5 internal format, produced by \n `ssh-keygen -o`\n- `options` -- Optional Object, extra options, with keys:\n - `filename` -- Optional String, name for the key being parsed \n (eg. the filename that was opened). Used to generate\n Error messages\n - `passphrase` -- Optional String, encryption passphrase used to decrypt an\n encrypted PEM file\n\n### `Key.isKey(obj)`\n\nReturns `true` if the given object is a valid `Key` object created by a version\nof `sshpk` compatible with this one.\n\nParameters\n\n- `obj` -- Object to identify\n\n### `Key#type`\n\nString, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`.
|
||
|
"readmeFilename": "README.md",
|
||
|
"repository": {
|
||
|
"type": "git",
|
||
|
"url": "git+https://github.com/arekinath/node-sshpk.git"
|
||
|
},
|
||
|
"scripts": {
|
||
|
"test": "tape test/*.js"
|
||
|
},
|
||
|
"version": "1.13.1"
|
||
|
}
|