Installations
npm install tweetnacl-util
Score
99.9
Supply Chain
92.3
Quality
75.6
Maintenance
100
Vulnerability
100
License
Developer
dchest
Developer Guide
Module System
CommonJS, UMD
Min. Node Version
Typescript Support
Yes
Node Version
13.6.0
NPM Version
6.13.4
Statistics
61 Stars
30 Commits
21 Forks
3 Watching
6 Branches
3 Contributors
Updated on 21 Nov 2024
Bundle Size
1.41 kB
Minified
610.00 B
Minified + Gzipped
Languages
JavaScript (99.91%)
HTML (0.09%)
Total Downloads
Cumulative downloads
Total Downloads
96,711,281
Last day
-46.1%
108,658
Compared to previous day
Last week
-13%
907,618
Compared to previous week
Last month
-2.4%
4,091,677
Compared to previous month
Last year
35.3%
31,201,688
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
3
tweetnacl-util-js
String encoding utilities extracted from early versions of https://github.com/dchest/tweetnacl-js
Notice
Encoding/decoding functions in this package are correct, however their performance and wide compatibility with uncommon runtimes is not something that is considered important compared to the simplicity and size of implementation. For example, they don't work under React Native.
Instead of this package, I strongly recommend using my StableLib packages:
-
@stablelib/utf8 for UTF-8 encoding/decoding (note that the names of operations are reversed compared to this package):
npm install @stablelib/utf8
Alternatively, in a modern environment, use TextEncoder and TextDecoder.
-
@stablelib/base64 for constant-time Base64 encoding/decoding:
npm install @stablelib/base64
Installation
Use a package manager:
$ bower install tweetnacl-util
NPM:
$ npm install tweetnacl-util
Usage
To make keep backward compatibility with code that used nacl.util
previously
included with TweetNaCl.js, just include it as usual:
<script src="nacl.min.js"></script>
<script src="nacl-util.min.js"></script>
<script>
// nacl.util functions are now available, e.g.:
// nacl.util.decodeUTF8
</script>
When using CommonJS:
var nacl = require('tweetnacl');
nacl.util = require('tweetnacl-util');
Documentation
nacl.util.decodeUTF8(string)
Decodes string and returns Uint8Array
of bytes.
nacl.util.encodeUTF8(array)
Encodes Uint8Array
or Array
of bytes into string.
nacl.util.decodeBase64(string)
Decodes Base-64 encoded string and returns Uint8Array
of bytes.
nacl.util.encodeBase64(array)
Encodes Uint8Array
or Array
of bytes into string using Base-64 encoding.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: The Unlicense: LICENSE:0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 2/21 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 12 are checked with a SAST tool
Reason
16 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-6chw-6frg-f759
- Warn: Project is vulnerable to: GHSA-832h-xg76-4gv6
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-hc9w-4p87-j549
- Warn: Project is vulnerable to: GHSA-wg6g-ppvx-927h
- Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2
- Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
Score
1.7
/10
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More