
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@browser-network/crypto
Advanced tools
A wrapper around eccrypto designed for use in the browser-network ecosystem
This package is just a wrapper around
eccrypto
. It's meant to be used with the
browser network and accompanying browser network apps. It's only for
convenience. If you're looking to bring cryptography into your non browser
network application, you should probably use eccrypto
or another cryptography
library directly instead of using this.
npm install @browser-network/crypto
or
<script src="//unpkg.com/@browser-network/network/umd/crypto.min.js"></script>
import * as bnc from 'browser-network/crypto'
// Generate a secret (private key) as used by browser-network
const secret = bnc.generateSecret()
// Get the public key mathematically derived from a given secret
const pubKey = bnc.derivePubKey(secret)
// Turn a given string into a `Uint8Array` buffer that eccrypto uses.
const buf = bnc.stob("Serena's ol bus")
// Turn the `Uint8Array` buffer that eccrypto uses into a string for export
const str = bnc.btos(buf) // "Serena's ol bus"
// Create a hash from an object
const has = bnc.hash({ some: 'object' }) // => `Uint8Array`
// Take an object and create a signature for it based on a given private key.
const signature = bnc.sign(secret, { some: 'object' })
// Ensure a signature of object by a pubKey comes from that pubKey's associated secret
const isValid = bnc.verifySignature({ some: 'object' }, signature, pubKey) // true
or if you're using the UMD build via a tag, the window
object will
automatically be populated with the field Bnc
which you can use as above, eg. Bnc.generateSecret()
.
FAQs
A wrapper around eccrypto designed for use in the browser-network ecosystem
The npm package @browser-network/crypto receives a total of 14 weekly downloads. As such, @browser-network/crypto popularity was classified as not popular.
We found that @browser-network/crypto demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.