An ECMAScript module to provide an easier and simplified method for encrypt GitHub secrets.
| Runtime \ Source | GitHub Raw | JSR | NPM |
|---|---|---|---|
| Bun >= v1.1.0 | ❌ | ✔️ | ✔️ |
| Deno >= v2.1.0 | ✔️ | ✔️ | ✔️ |
| NodeJS >= v20.9.0 | ❌ | ✔️ | ✔️ |
This does not request any runtime permission.
- GitHub Raw
https://raw.githubusercontent.com/hugoalh/github-sodium-es/{Tag}/mod.ts - JSR
jsr:@hugoalh/github-sodium[@{Tag}] - NPM
npm:@hugoalh/github-sodium[@{Tag}]
Note
- It is recommended to include tag for immutability.
- These are not part of the public APIs hence should not be used:
- Benchmark/Test file (e.g.:
example.bench.ts,example.test.ts). - Entrypoint name or path include any underscore prefix (e.g.:
_example.ts,foo/_example.ts). - Identifier/Namespace/Symbol include any underscore prefix (e.g.:
_example,Foo._example).
- Benchmark/Test file (e.g.:
| Name | Path | Description |
|---|---|---|
. |
./mod.ts |
Default. |
-
class GitHubSodiumSealer { constructor(publicKey: string); encrypt(value: string): string; }
Note
- For the full or prettier documentation, can visit via:
-
new GitHubSodiumSealer("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234").encrypt("plain-text-secret");