Comparing version 8.0.0 to 8.0.1
{ | ||
"name": "ssb-keys", | ||
"description": "keyfile operations for ssb", | ||
"version": "8.0.0", | ||
"version": "8.0.1", | ||
"homepage": "https://github.com/ssbc/ssb-keys", | ||
@@ -11,3 +11,3 @@ "repository": { | ||
"dependencies": { | ||
"chloride": "~2.2.8", | ||
"chloride": "~2.4.0", | ||
"mkdirp": "~0.5.0", | ||
@@ -22,3 +22,3 @@ "private-box": "~0.3.0" | ||
"pretty-quick": "^3.0.2", | ||
"tape": "^3.0.3" | ||
"tape": "^5.1.1" | ||
}, | ||
@@ -25,0 +25,0 @@ "engines": { |
@@ -69,3 +69,3 @@ "use strict"; | ||
exports.load = function (filename, cb) { | ||
filename = toFile(filename, "secret"); | ||
filename = toFile(filename); | ||
fs.readFile(filename, "ascii", function (err, privateKeyStr) { | ||
@@ -72,0 +72,0 @@ if (err) return cb(err); |
@@ -91,1 +91,17 @@ var tape = require("tape"); | ||
}); | ||
tape("don't create dir for fully-specified path", function (t) { | ||
const keyPath = path.join(os.tmpdir(), `ssb-keys-5-${Date.now()}`); | ||
t.equal(fs.existsSync(keyPath), false); | ||
ssbkeys.loadOrCreate(keyPath, (err) => { | ||
t.error(err); | ||
t.true(fs.lstatSync(keyPath).isFile()); | ||
ssbkeys.loadOrCreate(keyPath, (err, keys) => { | ||
t.error(err); | ||
t.equal(keys.public.length, 52); | ||
fs.unlinkSync(keyPath); | ||
t.end(); | ||
}); | ||
}); | ||
}); |
@@ -5,3 +5,5 @@ var tape = require("tape"); | ||
tape("secretBox, secretUnbox", function (t) { | ||
var key = Buffer.from("somewhere-over-the-rainbow-way-up-high"); | ||
var key = Buffer.from( | ||
"somewhere-over-the-rainbow-way-up-high".substring(0, 32) | ||
); | ||
@@ -8,0 +10,0 @@ var boxed = ssbkeys.secretBox({ okay: true }, key); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
29595
630
0
+ Addedchloride@2.4.1(transitive)
+ Addedsodium-native@3.4.1(transitive)
- Removedchloride@2.2.14(transitive)
- Removedini@1.3.8(transitive)
- Removedis-electron@2.2.2(transitive)
- Removednan@2.22.0(transitive)
- Removedsodium-native@2.4.9(transitive)
Updatedchloride@~2.4.0