{"id":15483525,"url":"https://github.com/hackergrrl/chacha-stream","last_synced_at":"2025-09-13T17:33:20.750Z","repository":{"id":57196502,"uuid":"227475431","full_name":"hackergrrl/chacha-stream","owner":"hackergrrl","description":"Encryption and decryption streams of libsodium's chacha20 implementation.","archived":false,"fork":false,"pushed_at":"2019-12-12T16:55:13.000Z","size":6,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"sprout","last_synced_at":"2025-08-09T03:04:22.304Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hackergrrl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-11T22:52:35.000Z","updated_at":"2020-01-08T19:49:13.000Z","dependencies_parsed_at":"2022-09-16T13:11:31.684Z","dependency_job_id":null,"html_url":"https://github.com/hackergrrl/chacha-stream","commit_stats":null,"previous_names":["noffle/chacha-stream"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hackergrrl/chacha-stream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackergrrl%2Fchacha-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackergrrl%2Fchacha-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackergrrl%2Fchacha-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackergrrl%2Fchacha-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hackergrrl","download_url":"https://codeload.github.com/hackergrrl/chacha-stream/tar.gz/refs/heads/sprout","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackergrrl%2Fchacha-stream/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274998789,"owners_count":25388204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T05:17:56.770Z","updated_at":"2025-09-13T17:33:20.518Z","avatar_url":"https://github.com/hackergrrl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chacha-stream\n\nThis module provides encryption and decryption streams for the sodium chacha20\nimplementation. It can be used to encrypt channels using a key already known to\nboth sides.\n\nIt manages communicating the stream nonce to the remote side, which is\ntransmitted in plaintext. This is safe information to leak (the nonce is used\nto detect replay attacks).\n\n## Usage\n\n```js\nconst chacha = require('chacha-stream')\nconst through = require('through2')\nconst crypto = require('crypto')\n\nfunction printer (prefix) {\n  return through(function (chunk, enc, next) {\n    console.log(prefix, chunk.toString())\n    next(null, chunk)\n  })\n}\n\nlet key = crypto.randomBytes(32)\nlet encode0 = chacha.encoder(key)\nlet decode0 = chacha.decoder(key)\n\nencode0.write('hello world')\n\nencode0.pipe(printer('encrypted')).pipe(decode0).pipe(printer('decrypted'))\n```\n\noutputs\n\n```\nencrypted }�?�lx\nencrypted z\u003e��Un��4�\ndecrypted hello world\n```\n\n## API\n\n```js\nvar chacha = require('chacha-stream')\n```\n\n### var encoder = chacha.encode(key)\n\nCreates a Transform stream that accepts plaintexts written to it, and outputs encrypted ciphertext.\n\n`key` is a 32-byte `Buffer`.\n\n### var decoder = chacha.decode(key)\n\nCreates a Transform stream that accepts ciphertext written to it, and outputs decrypted plaintext.\n\n`key` is a 32-byte `Buffer`.\n\n## Install\n\nWith [npm](https://npmjs.org/) installed, run\n\n```\n$ npm install chacha-stream\n```\n\n## License\n\nISC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackergrrl%2Fchacha-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhackergrrl%2Fchacha-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackergrrl%2Fchacha-stream/lists"}