{"id":26665376,"url":"https://github.com/elsehow/signal-stream","last_synced_at":"2025-10-12T14:17:57.829Z","repository":{"id":76067884,"uuid":"76694632","full_name":"elsehow/signal-stream","owner":"elsehow","description":"encrypt and decrypt streams with signal-protocol","archived":false,"fork":false,"pushed_at":"2016-12-20T17:18:30.000Z","size":1945,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-11T21:48:09.944Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elsehow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-17T00:22:32.000Z","updated_at":"2017-08-28T21:09:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"7041c6e4-4624-4da0-9bb8-bd5525b585e4","html_url":"https://github.com/elsehow/signal-stream","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elsehow/signal-stream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsehow%2Fsignal-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsehow%2Fsignal-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsehow%2Fsignal-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsehow%2Fsignal-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elsehow","download_url":"https://codeload.github.com/elsehow/signal-stream/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsehow%2Fsignal-stream/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011597,"owners_count":26084963,"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-10-12T02:00:06.719Z","response_time":53,"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":"2025-03-25T17:37:00.960Z","updated_at":"2025-10-12T14:17:57.802Z","avatar_url":"https://github.com/elsehow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# signal-stream\n\n```\nnpm install signal-stream\n```\n\nencrypt and decrypt streams \nusing the [signal-protocol](https://github.com/elsehow/signal-protocol)\n\n[![Build Status](https://travis-ci.org/elsehow/signal-protocol.svg?branch=master)](https://travis-ci.org/elsehow/signal-protocol)\n\n\n## example\n\n```javascript\nvar signalstream = require('signal-stream')\nvar signal = require('signal-protocol')\nvar h = require('signal-stream/test/helpers')(signal)\n\nh.bobAliceSessionCiphers()\n  .then(([aliceCipher, bobCipher]) =\u003e {\n    let alice = signalstream(aliceCipher)\n    let bob = signalstream(bobCipher)\n    require('http')\n      .get({\n        hostname:'info.cern.ch',\n        path: '/hypertext/WWW/TheProject.html',\n      }, res =\u003e {\n        res\n          .pipe(alice.encrypt)\n          .pipe(bob.decrypt)\n          .pipe(bob.encrypt)\n          .pipe(alice.decrypt)\n          .on('data', d =\u003e\n              console.log(d.toString()))\n      })\n  })\n  \n// \u003cHEADER\u003e\n// \u003cTITLE\u003eThe World Wide Web project\u003c/TITLE\u003e\n// ...\n```\n\nsee `examples/` for more.\n\n## api\n\n### signalstream(sessionCipher, opts)\n\nreturns an object `{ encrypt, decrypt }`.\n\n`encrypt` is a transform stream that consumes (plaintext) buffers and produces (encrypted) ciphertext objects (refer to [signal-protocol](https://github.com/elsehow/signal-protocol) for details).\n\n`decrypt` is a transform stream that consumes signal-protocol's ciphertext objects and produces plaintext buffers.\n\nthe default `opts` are\n\n```js\n{\n  jsonIn: false,\n  jsonOut: false,\n}\n```\n\nsetting these to `true` can be helpful if you need to (de-)serialize the objects produced by signal-protocol's `encrypt`, e.g. to send over a websocket or a network. (see `examples/net.js`).\n\n## license\n\nBSD\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsehow%2Fsignal-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felsehow%2Fsignal-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsehow%2Fsignal-stream/lists"}