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.5.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
decreased by-26.11%
Maintainers
1
Weekly downloads
 
Created
Source

bcrypto

Node.js

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 and libsecp256k1 with corresponding implementations in JavaScript.

Usage

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

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

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 (libtorsion)c (libtorsion)c (libtorsion)js
bcryptc (libtorsion)c (libtorsion)c (libtorsion)js
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-drbgc (libtorsion)c (libtorsion)c (libtorsion)js
dsac (libtorsion)c (libtorsion)c (libtorsion)js
eb2kc (libtorsion)c (libtorsion)c (libtorsion)js
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-drbgc (libtorsion)c (libtorsion)c (libtorsion)js
hkdfc (libtorsion)c (libtorsion)c (libtorsion)js
hmac-drbgc (libtorsion)c (libtorsion)c (libtorsion)js
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
murmur3c (libtorsion)c (libtorsion)c (libtorsion)js
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³
rc4c (libtorsion)c (libtorsion)c (libtorsion)js
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{224,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 x86-64 assembly
  2. optionally with libtorsion
  3. using the webcrypto api

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 30 Nov 2023

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