Giter Site home page Giter Site logo

jzeuzs / sodium Goto Github PK

View Code? Open in Web Editor NEW
14.0 1.0 4.0 5.25 MB

Libsodium for Node.js

Home Page: https://devtomio.github.io/sodium

License: MIT License

TypeScript 37.43% Rust 59.47% JavaScript 0.80% Dockerfile 2.28% Shell 0.02%
rust nodejs napi napi-rs sodium libsodium dryoc

sodium's Introduction

@devtomio/sodium

Libsodium for Node.js

GitHub Continuous Delivery Continuous Integration npm

Packages

npm npm npm npm npm npm npm npm npm npm

Features

  • Fully ready for TypeScript!
  • Includes ESM ready entrypoint
  • Easy to use
  • Has the same API as libsodium
  • Faster than similar libraries (see benchmarks)
  • Powered by Rust

Usage

For complete usages, please dive into our documentation

Basic usage

Generating a keypair

import * as sodium from '@devtomio/sodium';

const { public_key, secret_key } = sodium.crypto_box_keypair();

Benchmarks

$ yarn bench

Running "keypair generation" suite...
Progress: 100%

  libsodium-wrappers:
    5 109 ops/s, ±3.12%    | 85.44% slower

  tweetnacl:
    1 108 ops/s, ±1.11%    | slowest, 96.84% slower

  chloride:
    21 946 ops/s, ±7.45%   | 37.46% slower

  sodium:
    23 691 ops/s, ±1.00%   | 32.49% slower

  @devtomio/sodium:
    35 092 ops/s, ±2.84%   | fastest

Finished 5 cases!
  Fastest: @devtomio/sodium
  Slowest: tweetnacl

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Tomio

💻 📖 💡 🤔 🚇 🚧 📦

WhiteSource Renovate

🚧

renovate[bot]

🚧

This project follows the all-contributors specification. Contributions of any kind welcome!

License

This software is released under the MIT License, see LICENSE.

FOSSA Status

sodium's People

Contributors

github-actions[bot] avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

sodium's Issues

crypto_box_seal(challenge, publicKey);

Not sure, maybe I am doing something wrong.

Calling crypto_box_seal(challenge, publicKey);

Getting:
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Message("ciphertext length invalid (0 != 80, from dryoc/src/classic/crypto_box.rs:220")', src/crypto_box.rs:198:10

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update peaceiris/actions-gh-pages digest to 373f7f2
  • chore(deps): update dependency @favware/rollup-type-bundler to v2
  • chore(deps): update dependency @types/node to v18
  • chore(deps): update dependency conventional-changelog to v4
  • chore(deps): update dependency eslint-plugin-prettier to v5
  • chore(deps): update dependency prettier to v3
  • chore(deps): update dependency rollup to v3
  • chore(deps): update dependency typedoc-plugin-mdn-links to v3
  • chore(deps): update dependency typescript to v5
  • chore(deps): update sapphire dependencies (major) (@sapphire/eslint-config, @sapphire/prettier-config, @sapphire/ts-config)
  • chore(deps): update swatinem/rust-cache action to v2
  • chore(deps): update typescript-eslint monorepo to v6 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
Cargo.toml
  • napi 2.4.3
  • napi-derive 2.4.1
  • libc 0.2.126
  • napi-build 2.0.0
dockerfile
.devcontainer/Dockerfile
  • rust 1-bullseye
github-actions
.github/workflows/continuous-delivery.yml
  • google-github-actions/release-please-action v3@141edfb4d3a003bc1723056c9ab59ba000ec22c8
  • actions/checkout v3@2541b1294d2704b0964813337f33b291d3f8596b
  • actions/setup-node v3@eeb10cff27034e7acf239c5d29f62154018672fd
  • actions-rs/toolchain v1@16499b5e05bf2e26879000db0c1d13f7e13fa3af
  • actions-rs/cargo v1@844f36862e911db73fe0815f00a4a2602c279505
  • actions/cache v3@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d
  • actions/cache v3@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d
  • actions/cache v3@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d
  • actions/upload-artifact v3@3cea5372237819ed00197afe530f5a7ea3e805c8
  • actions/checkout v3@2541b1294d2704b0964813337f33b291d3f8596b
  • vmactions/freebsd-vm v0.1.6@45665d548dfeadbbebb5bb7971150211525fee46
  • actions/upload-artifact v3@3cea5372237819ed00197afe530f5a7ea3e805c8
  • actions/checkout v3@2541b1294d2704b0964813337f33b291d3f8596b
  • actions/setup-node v3@eeb10cff27034e7acf239c5d29f62154018672fd
  • actions/cache v3@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d
  • actions/download-artifact v3@fb598a63ae348fa914e94cd0ff38f362e927b741
.github/workflows/continuous-integration.yml
  • actions/checkout v3@2541b1294d2704b0964813337f33b291d3f8596b
  • actions-rs/toolchain v1@16499b5e05bf2e26879000db0c1d13f7e13fa3af
  • Swatinem/rust-cache v1
  • actions-rs/cargo v1@844f36862e911db73fe0815f00a4a2602c279505
  • actions/checkout v3@2541b1294d2704b0964813337f33b291d3f8596b
  • actions-rs/toolchain v1@16499b5e05bf2e26879000db0c1d13f7e13fa3af
  • Swatinem/rust-cache v1
  • actions/checkout v3@2541b1294d2704b0964813337f33b291d3f8596b
  • actions/setup-node v3@eeb10cff27034e7acf239c5d29f62154018672fd
  • creyD/prettier_action v4.2@6602189cf8bac1ce73ffe601925f6127ab7f21ac
  • actions/checkout v3@2541b1294d2704b0964813337f33b291d3f8596b
  • actions/setup-node v3@eeb10cff27034e7acf239c5d29f62154018672fd
  • actions/checkout v3@2541b1294d2704b0964813337f33b291d3f8596b
  • actions/setup-node v3@eeb10cff27034e7acf239c5d29f62154018672fd
  • peaceiris/actions-gh-pages v3@068dc23d9710f1ba62e86896f84735d869951305
.github/workflows/label-sync.yml
  • actions/checkout v3@2541b1294d2704b0964813337f33b291d3f8596b
  • crazy-max/ghaction-github-labeler v4@77450f9fa47c41fbab15c0923417fff00730ffa3
npm
npm/android-arm64/package.json
npm/darwin-arm64/package.json
npm/darwin-x64/package.json
npm/freebsd-x64/package.json
npm/linux-arm-gnueabihf/package.json
npm/linux-arm64-gnu/package.json
npm/linux-arm64-musl/package.json
npm/linux-x64-gnu/package.json
npm/linux-x64-musl/package.json
npm/win32-x64-msvc/package.json
package.json
  • @node-rs/helper ^1.3.3
  • tslib ^2.4.0
  • @favware/rollup-type-bundler ^1.0.7
  • @napi-rs/cli ^2.9.0
  • @sapphire/eslint-config ^4.3.6
  • @sapphire/prettier-config ^1.4.3
  • @sapphire/ts-config ^3.3.4
  • @swc-node/register ^1.5.1
  • @types/chloride ^2.4.0
  • @types/conventional-changelog ^3
  • @types/eslint ^8
  • @types/jest ^28.1.1
  • @types/libsodium-wrappers ^0
  • @types/node ^17.0.21
  • @types/prettier ^2
  • @typescript-eslint/eslint-plugin ^5.27.1
  • @typescript-eslint/parser ^5.27.1
  • benny ^3.7.1
  • chloride ^2.4.1
  • conventional-changelog ^3.1.25
  • cross-env ^7.0.3
  • eslint ^8.17.0
  • eslint-config-prettier ^8.5.0
  • eslint-plugin-prettier ^4.0.0
  • gen-esm-wrapper ^1.1.3
  • jest ^28.1.1
  • jest-circus ^28.1.1
  • libsodium-wrappers ^0.7.10
  • lint-staged ^13.0.1
  • prettier ^2.6.2
  • rollup ^2.75.6
  • rollup-plugin-version-injector ^1.3.3
  • ts-jest ^28.0.4
  • ts-node ^10.8.1
  • tweetnacl ^1.0.3
  • typedoc ^0.22.17
  • typedoc-plugin-extras ^2.2.3
  • typedoc-plugin-mdn-links ^1.0.6
  • typescript ^4.7.3
  • yarn 3.2.1

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.