sshpk
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -90,7 +90,9 @@ // Copyright 2015 Joyent, Inc. | ||
o = buf.writeUInt32BE(alg.length, o); | ||
buf.writeUInt32BE(alg.length, o); | ||
o += 4; | ||
o += buf.write(alg, o); | ||
for (i = 0; i < key.parts.length; ++i) { | ||
o = buf.writeUInt32BE(key.parts[i].data.length, o); | ||
buf.writeUInt32BE(key.parts[i].data.length, o); | ||
o += 4; | ||
o += key.parts[i].data.copy(buf, o); | ||
@@ -97,0 +99,0 @@ } |
@@ -79,2 +79,5 @@ // Copyright 2015 Joyent, Inc. | ||
update(this._rfc4253Cache).digest(); | ||
/* Workaround for node 0.8 */ | ||
if (typeof (hash) === 'string') | ||
hash = new Buffer(hash, 'binary'); | ||
this._hashCache[algo] = hash; | ||
@@ -81,0 +84,0 @@ return (hash); |
{ | ||
"name": "sshpk", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A library for finding and using SSH public keys", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"test": "tap test/*.js" | ||
"test": "tape test/*.js" | ||
}, | ||
@@ -32,2 +32,5 @@ "repository": { | ||
}, | ||
"engines": { | ||
"node": ">=0.8.0" | ||
}, | ||
"homepage": "https://github.com/arekinath/node-sshpk#readme", | ||
@@ -39,5 +42,5 @@ "dependencies": { | ||
"devDependencies": { | ||
"tap": "0.4.2", | ||
"tape": "^3.5.0", | ||
"benchmark": "^1.0.0" | ||
} | ||
} |
@@ -7,3 +7,3 @@ sshpk | ||
Supports RSA, DSA and ECDSA (nistp-*) key types. Can also parse SSH private | ||
Supports RSA, DSA and ECDSA (nistp-\*) key types. Can also parse SSH private | ||
keys in PEM format and output their public half. | ||
@@ -93,3 +93,3 @@ | ||
if (fp.matches(key)) | ||
console.log('found it!')'' | ||
console.log('found it!'); | ||
}); | ||
@@ -96,0 +96,0 @@ ``` |
@@ -8,3 +8,3 @@ var fs = require('fs'); | ||
var keyPem = fs.readFileSync('foo.pem'); | ||
var keyPem = fs.readFileSync('foo'); | ||
var keySsh = fs.readFileSync('foo.pub'); | ||
@@ -14,3 +14,3 @@ | ||
var key = sk.Key.parse(keyPem, 'pem'); | ||
var key = sk.Key.parse(keyPem, 'pem', './foo'); | ||
@@ -17,0 +17,0 @@ console.log('-> using a %d bit %s key', key.size, key.type); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
39212
990