{"id":13991771,"url":"https://github.com/github/tweetsodium","last_synced_at":"2025-10-04T07:31:05.490Z","repository":{"id":42442487,"uuid":"149156462","full_name":"github/tweetsodium","owner":"github","description":"libsodium sealed cryptobox using tweetnacl","archived":true,"fork":false,"pushed_at":"2022-04-05T23:10:28.000Z","size":115,"stargazers_count":44,"open_issues_count":0,"forks_count":15,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-09-04T17:58:05.469Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-17T16:39:05.000Z","updated_at":"2024-12-24T21:13:40.000Z","dependencies_parsed_at":"2022-09-01T04:40:58.243Z","dependency_job_id":null,"html_url":"https://github.com/github/tweetsodium","commit_stats":null,"previous_names":["mastahyeti/tweetsodium"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/github/tweetsodium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Ftweetsodium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Ftweetsodium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Ftweetsodium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Ftweetsodium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/tweetsodium/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Ftweetsodium/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278283485,"owners_count":25961309,"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-04T02:00:05.491Z","response_time":63,"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-08-09T14:01:34.629Z","updated_at":"2025-10-04T07:31:05.173Z","avatar_url":"https://github.com/github.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# ⚠️ `tweetsodium` is deprecated and unmaintained ⚠️\n\nConsider using [`libsodium.js`](https://github.com/jedisct1/libsodium.js), maintained by the same author as `libsodium`. For example:\n\n```js\nimport libsodium from \"libsodium-wrappers\";\n\n// Compatible with the same `Uint8Array` arguments as `tweetsodium.seal()`\nasync function async_encrypt(messageBytes, publicKey) {\n  await libsodium.ready;\n  return libsodium.crypto_box_seal(messageBytes, publicKey);\n}\n\n// Compatible with the same `Uint8Array` arguments as `tweetsodium.sealOpen()`\nasync function async_decrypt(messageBytes, publicKey, privateKey) {\n  await libsodium.ready;\n  return libsodium.crypto_box_seal_open(messageBytes, publicKey, privateKey);\n}\n```\n\nOr if you are able to use top-level await:\n\n```js\nimport libsodium from \"libsodium-wrappers\";\nawait libsodium.ready;\n\n// Use:\n// - `libsodium.crypto_box_seal` instead of `tweetsodium.seal`\n// - `libsodium.crypto_box_seal_open` instead of `tweetsodium.sealOpen`\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n---\n\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n# tweetsodium [![Build Status](https://travis-ci.org/mastahyeti/tweetsodium.svg?branch=master)](https://travis-ci.org/mastahyeti/tweetsodium)\n\nThis library implements [libsodium's sealed boxes](https://download.libsodium.org/doc/public-key_cryptography/sealed_boxes) using the [tweetnacl-js](https://github.com/dchest/tweetnacl-js) and [blakejs](https://github.com/dcposch/blakejs) libraries.\n\n## Usage\n\n```javascript\nconst nacl = require(\"tweetnacl\");\nconst sodium = require(\"tweetsodium\");\n\n// generate public key to use for encryption and coresponding secret key to use\n// for decryption\nconst keyPair = nacl.box.keyPair();\n\n// encrypts message string using public key\nfunction encrypt(message) {\n  const encoder = new TextEncoder();\n  const messageBytes = encoder.encode(message);\n\n  return sodium.seal(messageBytes, keyPair.publicKey);\n}\n\n// decrypts message using secret key\nfunction decrypt(ciphertext) {\n  const encoder = new TextEncoder();\n  const ciphertextBytes = encoder.encode(ciphertext);\n\n  return sodium.sealOpen(ciphertextBytes, keyPair.publicKey, keyPair.secretKey);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Ftweetsodium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Ftweetsodium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Ftweetsodium/lists"}