Skip to content

AbstractEncoder compatible secret key encoder using xchaha20/poly1305 constructs.

License

Notifications You must be signed in to change notification settings

telamon/crypto-encoder

Repository files navigation

crypto-encoder

Build Status JavaScript Style Guide

abstract-encoding compatible secret key encoder using xchaha20/poly1305 constructs.

Install

npm install crypto-encoder

Usage

Example using the crypto-encoder to encrypt the contents of a hypercore.

const ram = require('random-access-memory')
const hypercore = require('hypercore')
const CryptoEncoder = require('crypto-encoder')
const crypto = require('crypto')

const secret = crypto.randomBytes(32)

const feed = hypercore(ram, {
  contenEncoding: new CryptoEncoder(secret, 'json')
})

feed.append({ aMessage: 'this entire block will be encrypted' })

Similar projects:

Contributing

Ideas and contributions to the project are welcome. You must follow this guideline.

License

GNU AGPLv3 © Tony Ivanov

About

AbstractEncoder compatible secret key encoder using xchaha20/poly1305 constructs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published