All Projects → paragonie → Sodium Plus

paragonie / Sodium Plus

Licence: other
Developer-friendly libsodium interface

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Sodium Plus

Endesive
en-crypt, de-crypt, si-gn, ve-rify - smime, pdf, xades and plain files in pure python
Stars: ✭ 122 (-7.58%)
Mutual labels:  cryptography
Password4j
Password4j is a user-friendly cryptographic library that supports Argon2, Bcrypt, Scrypt, PBKDF2 and various cryptographic hash functions.
Stars: ✭ 124 (-6.06%)
Mutual labels:  cryptography
Libsodium Doc
Gitbook documentation for libsodium
Stars: ✭ 129 (-2.27%)
Mutual labels:  cryptography
Chest
Bash glue to encrypt and hide files
Stars: ✭ 123 (-6.82%)
Mutual labels:  cryptography
Noise
A decentralized P2P networking stack written in Go.
Stars: ✭ 1,695 (+1184.09%)
Mutual labels:  cryptography
Cryptolib4pascal
Crypto for Modern Object Pascal
Stars: ✭ 127 (-3.79%)
Mutual labels:  cryptography
Distaff
Zero-knowledge virtual machine written in Rust
Stars: ✭ 119 (-9.85%)
Mutual labels:  cryptography
Botan
Cryptography Toolkit
Stars: ✭ 1,798 (+1262.12%)
Mutual labels:  cryptography
Crylogger
CRYLOGGER: Detecting Crypto Misuses for Android and Java Apps Dynamically
Stars: ✭ 125 (-5.3%)
Mutual labels:  cryptography
Demo Twilio Backend Nodejs
A sample backend that demonstrates how to generate a Virgil JWT and Twilio token used for authentication with the Virgil and Twilio services
Stars: ✭ 128 (-3.03%)
Mutual labels:  cryptography
I2pd
🛡 I2P: End-to-End encrypted and anonymous Internet
Stars: ✭ 1,796 (+1260.61%)
Mutual labels:  cryptography
Noise
.NET Standard 1.3 implementation of the Noise Protocol Framework (revision 33 of the spec)
Stars: ✭ 124 (-6.06%)
Mutual labels:  cryptography
Torchbear
🔥🐻 The Speakeasy Scripting Engine Which Combines Speed, Safety, and Simplicity
Stars: ✭ 128 (-3.03%)
Mutual labels:  cryptography
Chromium Gost
Chromium с поддержкой алгоритмов ГОСТ
Stars: ✭ 123 (-6.82%)
Mutual labels:  cryptography
Merkle Tree
Merkle Trees and Merkle Inclusion Proofs
Stars: ✭ 130 (-1.52%)
Mutual labels:  cryptography
Pycryptodome
A self-contained cryptographic library for Python
Stars: ✭ 1,817 (+1276.52%)
Mutual labels:  cryptography
Feathercoin
Stars: ✭ 126 (-4.55%)
Mutual labels:  cryptography
Useful Crypto Resources
A place for useful crypto-related resources plus some of my fav stuff
Stars: ✭ 131 (-0.76%)
Mutual labels:  cryptography
Lockbox Extension
Experimental Firefox extension for login management experiences, not being actively developed
Stars: ✭ 130 (-1.52%)
Mutual labels:  cryptography
Stream Ciphers
Collection of stream cipher algorithms
Stars: ✭ 127 (-3.79%)
Mutual labels:  cryptography

Sodium-Plus (Na+)

Build Status npm version

Sodium-Plus delivers a positive cryptography experience for JavaScript developers.

Sodium-Plus brings you all the benefits of using libsodium in your application without any of the headaches introduced by the incumbent APIs.

Sodium-Plus is permissively licensed (ISC) and free to use.

Features

  • Cross-platform.
  • Pluggable backend with an auto-loader:
  • Fully async/await ready (aside from object constructors).
  • Type-safe API:
    • Instead of just passing around Buffer objects and hoping you got your argument order correct, sodium-plus will throw an Error if you provide the wrong key type. This prevents you from accidentally introducing a severe security risk into your application.

Installing

Installing as a Node.js Module

With NPM:

npm install sodium-plus

You can optionally install sodium-native alongside sodium-plus if you want better performance.

The default configuration is a bit slower, but has a wider reach (e.g. web browsers).

Installing in a Web Page

See this section of the documentation for getting started with Sodium-Plus in a web browser.

Using Sodium-Plus in Your Projects

SodiumPlus is meant to be used asynchronously, like so:

const { SodiumPlus } = require('sodium-plus');

(async function() {
    // Select a backend automatically
    let sodium = await SodiumPlus.auto();

    let key = await sodium.crypto_secretbox_keygen();
    let nonce = await sodium.randombytes_buf(24);
    let message = 'This is just a test message';
    // Message can be a string, buffer, array, etc.

    let ciphertext = await sodium.crypto_secretbox(message, nonce, key);
    console.log(ciphertext);
    let decrypted = await sodium.crypto_secretbox_open(ciphertext, nonce, key);
    console.log(decrypted.toString('utf-8'));
})();

This should produce output similar to below (but with different random-looking bytes):

<Buffer 00 b7 66 89 3d b4 4d e9 7e 0f 66 91 fd d1 ca fd be bb 7f 00 89 76 5b 48 ec ed 80 cc 87 76 54 1b b5 ea 87 9b e5 19 ee 4c 31 c5 63>
This is just a test message

Documentation

The documentation is available online on Github!

Support Contracts

If your company uses this library in their products or services, you may be interested in purchasing a support contract from Paragon Initiative Enterprises.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].