New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gpgfs

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gpgfs

gpgfs

  • 0.5.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
2
Weekly downloads
 
Created
Source

gpgfs

gpgfs is an encrypted file storage solution utilizing gnupg to implement the gpgfs file system

  • Documentation - datapartyjs.github.io/gpgfs/
  • NPM - npmjs.com/package/gpgfs
  • Code - github.com/datapartyjs/gpgfs
  • Social - @datapartyjs

Goals

  • Private by default
  • Transport agnostic
  • Represent file buckets
  • Encrypted metadata
  • Granular permissions

API Example

const gpgfs = require('gpgfs')


async function main(){
  const securefs = new gpgfs()

  await securefs.open()

  //! Trust user
  await securefs.keychain.trustCard()

  const bucket = await securefs.bucket('staging')

  if(!bucket.exists()){
    console.log('creating bucket')
    await bucket.create()
  }

  const file = await bucket.file('directory-1/foo/bar/file-test.txt')

  if(!file.exists()){
    console.log('creating file', file.id)
    await file.create()

    await file.save('hello world\n')
  }

  const [ content, metadata, lastchange ] = await Promise.all([
    file.read(),
    file.getMetadata(),
    file.getLastchange()
  ])

  console.log('metadata', metadata)
  console.log('lastchange', lastchange)
  console.log('file-content [', content.toString(), ']')

}

Filesystem .gpgfs

Bucket content is stored in the .gpgfs directory, locatable anywhere on a host file system. All files are encrypted as PGP armored output

.gpgfs/
└── buckets
    └── bucket-5e571d7969643103e4887f5f
        ├── index
        ├── keys
        │   ├── meta-read-key
        │   └── read-key
        ├── metadata
        ├── object-lastchange
        │   └── object-5e571d7e69643103e4887f60-lastchange
        ├── object-meta
        │   └── object-5e571d7e69643103e4887f60-meta
        └── objects
            └── object-5e571d7e69643103e4887f60

FAQs

Package last updated on 27 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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