Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

archiviation

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

archiviation

A way to publish text with GitHub Pages without allowing everyone to read.

  • 0.2.20
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Archiviation (work-in-progress)

A way to publish text with GitHub Pages without allowing everyone to read.

Note: This software does not have a stable version yet.

Explain Like You Are A Developer

Archiviation encrypts your text files with AES. The AES key is derived from the master key and the filename. The master key is automatically generated during initialization.

A file can be accessed online with a URL like https://username.github.io/?key=${__AES_KEY__}&file=${__FILE_NAME__}, after you push the repository to GitHub Pages (or any other web server). The identifier consists of the 64-character-long AES encryption key and the filename hash. The page will load the file with XMLHttpRequest from https://username.github.io/db/${__FILE_NAME__}. So you do not have to worry about the sensitivity of file names; the URL itself cannot be used to infer the filename.

__AES_KEY__ is generated by:

var key = crypto.createHash('sha256').update(config.masterKey + 'd46fb93ff24448b4a04ee3115cf5147d|9cfbf34fc443455baf19c27f692ecc76|' + articleFileName_raw).digest('base64').replace(/[\=\+\/]/g, '').slice(0, 22);
return key;

__FILE_NAME__ is generated by:

var masterSalt = crypto.createHash('sha256').update(config.masterKey.slice(0, 32)).digest('base64');
var filename = crypto.createHash('sha256').update('d46fb93ff24448b4a04ee3115cf5147d|9cfbf34fc443455baf19c27f692ecc77|' + masterSalt + articleFileName_raw).digest('base64').replace(/[\=\+\/]/g, '').slice(0, 28);
filename += '_' + crypto.createHash('sha256').update('48b4a04ee3115c' + masterSalt.slice(0,5) + articleFileName_raw).digest('base64').replace(/[\=\+\/]/g, '').slice(4, 8);
return filename;

This approach should probably be cryptographically strong enough. Probably!

Use

Dependencies

  • node
  • npm

Installation

Install through NPM:

$ npm install -g archiviation

If NPM is not available:

$ git clone https://github.com/neruthes/archiviation.git
$ cd archiviation
$ npm install .
$ npm link

Initialization

Get inside a directory which you would like to store your project.

$ archiviation init
$ archiviation build
$ cat docs-index.txt

Configuration

All information you are able to configure is in /archiviation-config.json.

Management

You may add plaintext files in /source-articles.

Publishing

You are supposed to git init in /html. And publish to any web server, like GitHub Pages.

Cheatsheet

LINKTO

Create a link to a file. Otherwise, if you add a link in Markdown grammar to a file in the archive, you will need to manually update the link whenever you modify the master key. Modifying the master key will make all previously generated links invalid.

{{LINKTO|File_Name.txt}}

© 2018-2020 Neruthes (a.k.a. J.N.)

License: AGPL.

FAQs

Package last updated on 20 Mar 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