Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bcrypto

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bcrypto

JS crypto library

  • 5.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12K
decreased by-12.81%
Maintainers
1
Weekly downloads
 
Created
Source

bcrypto

Build Status

The missing crypto module for Node.js. Bcrypto provides you with a consistent interface across Node.js and the browser. It is implemented as a Node.js addon for C libraries libtorsion (with support for openssl and libgmp) and libsecp256k1 with corresponding implementations in JavaScript.

Usage

const random = require('bcrypto/lib/random');
const entropy = random.randomBytes(32);

const hash256 = require('bcrypto/lib/hash256');
const digest = hash256.digest(Buffer.alloc(32, 0x00));

API

See the ./lib directory for available modules and APIs.

Implementations

nodejs (linux)nodejs (macos)nodejs (win)browser
aeadc (libtorsion¹)c (libtorsion¹)c (libtorsion¹)js
aesc (openssl)c (openssl)c (openssl)js
bcryptjsjsjsjs
blake2b{160,256,384,512}c (libtorsion)c (libtorsion)c (libtorsion)js
blake2s{128,160,224,256}c (libtorsion)c (libtorsion)c (libtorsion)js
bnjs w/ bigintjs w/ bigintjs w/ bigintjs
chacha20c (libtorsion¹)c (libtorsion¹)c (libtorsion¹)js
cshake{128,256}c (libtorsion¹)c (libtorsion¹)c (libtorsion¹)js
ctr-drbgjsjsjsjs
dsac (libtorsion²)c (libtorsion²)c (libtorsion)js
eb2kjsjsjsjs
eciesc (libtorsion¹)c (libtorsion¹)c (libtorsion¹)js
ed25519c (libtorsion)c (libtorsion)c (libtorsion)js
ed448c (libtorsion)c (libtorsion)c (libtorsion)js
gost94c (libtorsion)c (libtorsion)c (libtorsion)js
hash160c (libtorsion³)c (libtorsion³)c (libtorsion)js
hash256c (libtorsion³)c (libtorsion³)c (libtorsion)js
hash-drbgjsjsjsjs
hkdfjsjsjsjs
hmac-drbgjsjsjsjs
keccak/sha3{224,256,384,512}c (libtorsion¹)c (libtorsion¹)c (libtorsion¹)js
kmac{128,256}c (libtorsion¹)c (libtorsion¹)c (libtorsion¹)js
md{2,4,5}c (libtorsion)c (libtorsion)c (libtorsion)js
md5sha1c (libtorsion)c (libtorsion)c (libtorsion)js
merklejsjsjsjs
mrkljsjsjsjs
murmur3cccjs
p{192,224,256,384,521}c (libtorsion)c (libtorsion)c (libtorsion)js
pbkdf2c (libtorsion)c (libtorsion)c (libtorsion)js
pgpjsjsjsjs
poly1305c (libtorsion)c (libtorsion)c (libtorsion)js
randomc (openssl)c (openssl)c (openssl)js
rc4jsjsjsjs
ripemd160c (libtorsion)c (libtorsion)c (libtorsion)js
rsac (libtorsion²)c (libtorsion²)c (libtorsion)js
rsaiesc (libtorsion¹)c (libtorsion¹)c (libtorsion¹)js
salsa20c (libtorsion¹)c (libtorsion¹)c (libtorsion¹)js
schnorrc (libtorsion)c (libtorsion)c (libtorsion)js
scryptc (libtorsion)c (libtorsion)c (libtorsion)js
secp256k1c (libsecp256k1⁴)c (libsecp256k1⁴)c (libsecp256k1⁴)js
sha1c (libtorsion)c (libtorsion)c (libtorsion)js
sha{256,384,512}c (libtorsion³)c (libtorsion³)c (libtorsion)js
shake{128,256}c (libtorsion¹)c (libtorsion¹)c (libtorsion¹)js
siphashc (libtorsion)c (libtorsion)c (libtorsion)js
sshjsjsjsjs
whirlpoolc (libtorsion)c (libtorsion)c (libtorsion)js
x25519c (libtorsion)c (libtorsion)c (libtorsion)js
x448c (libtorsion)c (libtorsion)c (libtorsion)js

Footnotes

  1. with assembly for x64
  2. with libgmp and openssl (only libgmp on electron)
  3. with openssl (except on electron)
  4. optionally with libtorsion

Contribution and License Agreement

If you contribute code to this project, you are implicitly allowing your code to be distributed under the MIT license. You are also implicitly verifying that all code is your original work. </legalese>

License

  • Copyright (c) 2017-2019, Christopher Jeffrey (MIT License).

See LICENSE for more info.

Keywords

FAQs

Package last updated on 20 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc