{"id":31063893,"url":"https://github.com/hugoalh/nacl-es","last_synced_at":"2025-10-08T12:03:33.283Z","repository":{"id":304958531,"uuid":"1020606683","full_name":"hugoalh/nacl-es","owner":"hugoalh","description":"An ECMAScript (JavaScript \u0026 TypeScript) module for NaCl / TweetNaCl high-security cryptographic library.","archived":false,"fork":false,"pushed_at":"2025-08-29T09:59:10.000Z","size":2148,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-05T14:04:10.484Z","etag":null,"topics":["ecmascript","ecmascript-module","es","es-module","esm","esmodule","javascript","js","nacl","ts","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hugoalh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-16T06:09:28.000Z","updated_at":"2025-08-29T09:59:13.000Z","dependencies_parsed_at":"2025-07-17T16:50:25.427Z","dependency_job_id":null,"html_url":"https://github.com/hugoalh/nacl-es","commit_stats":null,"previous_names":["hugoalh/nacl-es"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hugoalh/nacl-es","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugoalh%2Fnacl-es","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugoalh%2Fnacl-es/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugoalh%2Fnacl-es/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugoalh%2Fnacl-es/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hugoalh","download_url":"https://codeload.github.com/hugoalh/nacl-es/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugoalh%2Fnacl-es/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275267362,"owners_count":25434612,"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-15T02:00:09.272Z","response_time":75,"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":["ecmascript","ecmascript-module","es","es-module","esm","esmodule","javascript","js","nacl","ts","typescript"],"created_at":"2025-09-15T13:55:38.784Z","updated_at":"2025-10-08T12:03:33.265Z","avatar_url":"https://github.com/hugoalh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NaCl (ES)\n\n[**⚖️** MIT](./LICENSE.md)\n\n[![GitHub: hugoalh/nacl-es](https://img.shields.io/github/v/release/hugoalh/nacl-es?label=hugoalh/nacl-es\u0026labelColor=181717\u0026logo=github\u0026logoColor=ffffff\u0026sort=semver\u0026style=flat \"GitHub: hugoalh/nacl-es\")](https://github.com/hugoalh/nacl-es)\n[![JSR: @hugoalh/nacl](https://img.shields.io/jsr/v/@hugoalh/nacl?label=@hugoalh/nacl\u0026labelColor=F7DF1E\u0026logo=jsr\u0026logoColor=000000\u0026style=flat \"JSR: @hugoalh/nacl\")](https://jsr.io/@hugoalh/nacl)\n[![NPM: @hugoalh/nacl](https://img.shields.io/npm/v/@hugoalh/nacl?label=@hugoalh/nacl\u0026labelColor=CB3837\u0026logo=npm\u0026logoColor=ffffff\u0026style=flat \"NPM: @hugoalh/nacl\")](https://www.npmjs.com/package/@hugoalh/nacl)\n\nAn ECMAScript module for [NaCl](https://nacl.cr.yp.to/) / [TweetNaCl](https://tweetnacl.cr.yp.to/) high security cryptographic library.\n\nThis is a modified edition of the [TweetNaCl JS](https://github.com/dchest/tweetnacl-js) which with ECMAScript and TypeScript.\n\n## 🎯 Targets\n\n| **Runtime \\\\ Source** | **GitHub Raw** | **JSR** | **NPM** |\n|:--|:-:|:-:|:-:|\n| **[Bun](https://bun.sh/)** \u003e= v1.1.0 | ❌ | ✔️ | ✔️ |\n| **[Deno](https://deno.land/)** \u003e= v2.1.0 | ✔️ | ✔️ | ✔️ |\n| **[NodeJS](https://nodejs.org/)** \u003e= v20.9.0 | ❌ | ✔️ | ✔️ |\n\n## 🛡️ Runtime Permissions\n\nThis does not request any runtime permission.\n\n## #️⃣ Sources\n\n- GitHub Raw\n  ```\n  https://raw.githubusercontent.com/hugoalh/nacl-es/{Tag}/mod.ts\n  ```\n- JSR\n  ```\n  jsr:@hugoalh/nacl[@{Tag}]\n  ```\n- NPM\n  ```\n  npm:@hugoalh/nacl[@{Tag}]\n  ```\n\n\u003e [!NOTE]\n\u003e - It is recommended to include tag for immutability.\n\u003e - These are not part of the public APIs hence should not be used:\n\u003e   - Benchmark/Test file (e.g.: `example.bench.ts`, `example.test.ts`).\n\u003e   - Entrypoint name or path include any underscore prefix (e.g.: `_example.ts`, `foo/_example.ts`).\n\u003e   - Identifier/Namespace/Symbol include any underscore prefix (e.g.: `_example`, `Foo._example`).\n\n## ⤵️ Entrypoints\n\n| **Name** | **Path** | **Description** |\n|:--|:--|:--|\n| `.` | `./mod.ts` | Default. High level APIs. |\n| `./lowlevel` | `./lowlevel.ts` | Low level APIs. |\n\n## 🧩 APIs\n\n- ```ts\n  function box(msg: Uint8Array, nonce: Uint8Array, publicKey: Uint8Array, secretKey: Uint8Array): Uint8Array;\n  ```\n- ```ts\n  function boxBefore(publicKey: Uint8Array, secretKey: Uint8Array): Uint8Array;\n  ```\n- ```ts\n  function boxKeyPair(): KeyPair;\n  ```\n- ```ts\n  function boxKeyPairFromSecretKey(secretKey: Uint8Array): KeyPair;\n  ```\n- ```ts\n  function boxOpen(msg: Uint8Array, nonce: Uint8Array, publicKey: Uint8Array, secretKey: Uint8Array): Uint8Array | null;\n  ```\n- ```ts\n  function hash(msg: Uint8Array): Uint8Array;\n  ```\n- ```ts\n  function scalarMult(n: Uint8Array, p: Uint8Array): Uint8Array;\n  ```\n- ```ts\n  function scalarMultBase(n: Uint8Array): Uint8Array;\n  ```\n- ```ts\n  function secretBox(msg: Uint8Array, nonce: Uint8Array, key: Uint8Array): Uint8Array;\n  ```\n- ```ts\n  function secretBoxOpen(box: Uint8Array, nonce: Uint8Array, key: Uint8Array): Uint8Array | null;\n  ```\n- ```ts\n  function sign(msg: Uint8Array, secretKey: Uint8Array): Uint8Array;\n  ```\n- ```ts\n  function signDetached(msg: Uint8Array, secretKey: Uint8Array): Uint8Array;\n  ```\n- ```ts\n  function signDetachedVerify(msg: Uint8Array, sig: Uint8Array, publicKey: Uint8Array): boolean;\n  ```\n- ```ts\n  function signKeyPair(): KeyPair;\n  ```\n- ```ts\n  function signKeyPairFromSecretKey(secretKey: Uint8Array): KeyPair;\n  ```\n- ```ts\n  function signKeyPairFromSeed(seed: Uint8Array): KeyPair;\n  ```\n- ```ts\n  function signOpen(signedMsg: Uint8Array, publicKey: Uint8Array): Uint8Array | null;\n  ```\n- ```ts\n  function verify(x: Uint8Array, y: Uint8Array): boolean;\n  ```\n- ```ts\n  interface KeyPair {\n    publicKey: Uint8Array;\n    secretKey: Uint8Array;\n  }\n  ```\n\n\u003e [!NOTE]\n\u003e - For the full or prettier documentation, can visit via:\n\u003e   - [Deno CLI `deno doc`](https://docs.deno.com/runtime/reference/cli/doc/)\n\u003e   - [JSR](https://jsr.io/@hugoalh/nacl)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugoalh%2Fnacl-es","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugoalh%2Fnacl-es","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugoalh%2Fnacl-es/lists"}