Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
hypercore-id-encoding
Advanced tools
Encodes Hypercore keys into z-base32 ids, and decodes both hex/z-base32 strings.
npm install hypercore-id-encoding
const { encode, decode, normalize } = require('hypercore-id-encoding')
const id = encode(core.key) // (z-base32 String)
const hexEncoded = core.key.toString('hex')
const core = new Hypercore(ram, decode(id))
const core2 = new Hypercore(ram, decode(hexEncoded)) // Will also work with hex
const id2 = normalize(id)
const id3 = normalize(hexEncoded)
const id = encode(hypercoreKey)
Encodes a 32-byte Hypercore key into a z-base32 id.
hypercoreKey
must be a Buffer or an ArrayBuffer.
const buf = decode(hypercoreId)
Decodes an id or pear link into a Hypercore key.
If hypercoreId
is a 52-character String, it will be decoded as z-base32.
If hypercoreId
is a 64-character String, it will be decoded as hex.
If hypercoreId
is already a Buffer and is a valid id, it will be returned as-is.
const id = normalize(any)
Decodes and encodes the input any
to always return a z-base32 id.
isValid(any)
Returns a boolean indicating whether the key is a valid hypercore key (meaning that it can be decoded/normalised).
Apache-2.0
FAQs
Convert Hypercore keys to/from z-base32 or hex
The npm package hypercore-id-encoding receives a total of 1,454 weekly downloads. As such, hypercore-id-encoding popularity was classified as popular.
We found that hypercore-id-encoding demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.