Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 13, 2024 via pnpm

tweetnacl 0.14.5

Port of TweetNaCl cryptographic library to JavaScript
Package summary
Share
0
issues
1
license
1
Unlicense
Package created
8 Jul 2014
Version published
13 Dec 2016
Maintainers
1
Total deps
1
Direct deps
0
License
Unlicense

Issues

0
This package has no issues

Licenses

The Unlicense

Public Domain
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
private-use
modify
Cannot
include-copyright
hold-liable
Must
1 Packages, Including:
tweetnacl@0.14.5
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of tweetnacl 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does tweetnacl do?

TweetNaCl is a port of the TweetNaCl cryptographic library to JavaScript intended for modern browsers and Node.js. Its primary purpose is to offer an idiomatic high-level API on top of TweetNaCl while keeping the translation as close as possible to the original C implementation. As the package name suggests, it focuses on encryption and decryption, providing API functions for public-key authenticated encryption, secret-key authenticated encryption, scalar multiplication, signatures, hashing and random bytes generation.

How do you use tweetnacl?

Using TweetNaCl involves importing it into your project and then calling its functions as needed. For instance, after installing TweetNaCl via npm or yarn, you might use it in a Node.js script like this:

var nacl = require('tweetnacl');
nacl.randomBytes(10);

The above code imports the 'tweetnacl' module and uses it to generate an Uint8Array with 10 random byte values. In the browser, the package exposes itself as a global object named 'nacl'. Here's a sample usage:

var pair = nacl.box.keyPair();
console.log(pair.publicKey, pair.secretKey);

This script creates a new public and secret key pair for box encryption and logs them to the console.

Keep in mind that to leverage TweetNaCl fully, you must familiarize yourself with a variety of methods it offers like 'nacl.box', 'nacl.box.keyPair', 'nacl.box.open', 'nacl.secretbox', 'nacl.secretbox.open' and 'nacl.hash', among others.

Where are the tweetnacl docs?

For complete documentation of TweetNaCl, see the README in its GitHub repository. This document provides detailed explanations of all the library's functions, along with examples of how to call them. For more hands-on learning, you can check out the usage examples in the package's wiki. Remember that understanding how to use TweetNaCl effectively requires a basic understanding of cryptographic concepts and the specific algorithms it implements.