Socket
Socket
Sign inDemoInstall

ssb-keys

Package Overview
Dependencies
Maintainers
23
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssb-keys - npm Package Compare versions

Comparing version 7.2.1 to 7.2.2

.travis.yml

2

package.json
{
"name": "ssb-keys",
"description": "keyfile operations for ssb",
"version": "7.2.1",
"version": "7.2.2",
"homepage": "https://github.com/ssbc/ssb-keys",

@@ -6,0 +6,0 @@ "repository": {

var tape = require('tape')
var ssbkeys = require('../')
var crypto = require('crypto')
var path = '/tmp/ssb-keys_'+Date.now()
var path = require('path')
var os = require('os')
var fs = require('fs')
const keyPath = path.join(os.tmpdir(), `ssb-keys-${Date.now()}`)
console.log(keyPath)
tape('create and load presigil-legacy async', function (t) {

@@ -11,5 +15,5 @@

keys.id = keys.id.substring(1)
fs.writeFileSync(path, JSON.stringify(keys))
fs.writeFileSync(keyPath, JSON.stringify(keys))
var k2 = ssbkeys.loadSync(path)
var k2 = ssbkeys.loadSync(keyPath)
t.equal(k2.id, '@' + keys.id)

@@ -24,5 +28,5 @@ t.end()

keys.id = keys.id.substring(1)
fs.writeFileSync(path, JSON.stringify(keys))
fs.writeFileSync(keyPath, JSON.stringify(keys))
ssbkeys.load(path, function (err, k2) {
ssbkeys.load(keyPath, function (err, k2) {
if(err) throw err

@@ -37,9 +41,9 @@ t.equal(k2.id, '@' + keys.id)

fs.writeFileSync(path, 'this file intentionally left blank', 'utf8')
fs.writeFileSync(keyPath, 'this file intentionally left blank', 'utf8')
t.throws(function () {
ssbkeys.createSync(path)
ssbkeys.createSync(keyPath)
})
ssbkeys.create(path, function (err) {
ssbkeys.create(keyPath, function (err) {
t.ok(err)
fs.unlinkSync(path)
fs.unlinkSync(keyPath)
t.end()

@@ -46,0 +50,0 @@ })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc