npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

xorchive

v1.1.1

Published

Hyperdimensional lockbox, OFFS variant

Downloads

4

Readme

pure | mod code style | standard

xorchive

Hyperdimensional lockbox

A variant implementation of OFFS technique.

No way to tell how many entries an archive contains. Each pad in the archive might or might not be part of multiple files.

  • Sits ontop of random-access-storage (works in browser + node)
  • XOR-pad encrypts contents (default 7 pads)
  • Unknown total amount of files
  • Unique key for each file
  • Uses blake3 to hash pads into keys

Install

yarn add xorchive

Usage

const raf = require('random-access-file')
const Xorchive = require('xorchive')

const xfs = new Xorchive(raf('myStuff/'), nPads = 7)

let k1 = await xfs.store(readFileSync('~/secret_evidence.md'))
const k2 = await xfs.store(readFileSync('~/README.md'))
// Each key is (32 * nPads) bytes in size

const doc = await xfs.recover(k2)

let k1 = null // secret_evidence.md is now lost forever,
// and there's no proof of it ever having been stored.

API

new Xorchive(storage, nPads = 7, padSize = 128kB, hashSize = 32)

Initialized a new archive.

  • nPads number of random pads to use for chunk encryption.
  • padSize the size of a pad. defaults to 128 << 10
  • hashSize blake3 hashSize

store(data)

Encrypts your data as data.length / padSize chunks and returns a Promise for a key-buffer containing all the hashes of the pads used during encryption.

  • data accepts Buffer, UInt8Array and Array

recover(key)

Attempts to find all the pads referenced in the key and reconstruct the original data.

returns a Promsie that resolves to your original data if the key is valid.

Donations

 _____                      _   _           _
|  __ \   Help Wanted!     | | | |         | |
| |  | | ___  ___ ___ _ __ | |_| |     __ _| |__  ___   ___  ___
| |  | |/ _ \/ __/ _ \ '_ \| __| |    / _` | '_ \/ __| / __|/ _ \
| |__| |  __/ (_|  __/ | | | |_| |___| (_| | |_) \__ \_\__ \  __/
|_____/ \___|\___\___|_| |_|\__|______\__,_|_.__/|___(_)___/\___|

If you're reading this it means that the docs are missing or in a bad state.

Writing and maintaining friendly and useful documentation takes
effort and time. In order to do faster releases
I will from now on provide documentation relational to project activity.

  __How_to_Help____________________________________.
 |                                                 |
 |  - Open an issue if you have ANY questions! :)  |
 |  - Star this repo if you found it interesting   |
 |  - Fork off & help document <3                  |
 |.________________________________________________|

I publish all of my work as Libre software and will continue to do so,
drop me a penny at Patreon to help fund experiments like these.

Patreon: https://www.patreon.com/decentlabs
Discord: https://discord.gg/K5XjmZx
Telegram: https://t.me/decentlabs_se

Changelog

1.2.0

  • added API docs
  • "fixed" data-length returned by Xorchive#recover() in most cases

1.1.0

  • added pad rotatation by oridnal to make the order of pads significant.
  • fixed chunked store/recover

1.0.0

  • first release

Contributing

By making a pull request, you agree to release your modifications under the license stated in the next section.

Only changesets by human contributors will be accepted.

License

GNU AGPLv3 © Tony Ivanov