https://github.com/neonbyte1/deno-libsodium
Closes the gap between the npm package and deno
https://github.com/neonbyte1/deno-libsodium
deno jsr libsodium libsodium-deno typescript
Last synced: 2 months ago
JSON representation
Closes the gap between the npm package and deno
- Host: GitHub
- URL: https://github.com/neonbyte1/deno-libsodium
- Owner: neonbyte1
- License: mit
- Created: 2024-12-01T04:59:14.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-12-01T06:19:37.000Z (7 months ago)
- Last Synced: 2025-02-14T02:30:42.999Z (4 months ago)
- Topics: deno, jsr, libsodium, libsodium-deno, typescript
- Language: TypeScript
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# deno-libsodium
With the release of Deno 2.0 the [support for npm packages]((https://docs.deno.com/runtime/fundamentals/node/)) is now available, but this does not work “out-of-the-box” for the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) package, as the actual functions are only provided after loading the WebAssembly file. Therefore, this small module closes the gap to be able to use sodium as usual!
## Usage
All functions, interfaces and constants were taken from [@types/libsodium-wrappers](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/libsodium-wrappers/index.d.ts) with a few non functional related changes. The only difference is the initial routine, you need to call `await sodium_init()` now instead of `await ready`.
## License
[libsodium](https://github.com/jedisct1) uses the [ISC](https://github.com/jedisct1/libsodium.js/blob/master/LICENSE) license while this repository was published under the [MIT](LICENSE.md) license.