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.
Bloem implements three Bloom Filters for node.js. All use the FNV Hash function and the optimization described in [1] by Kirsch and Mitzenmacher.
npm install bloem
var bloem = require('bloem')
var filter = new bloem.Bloem(16, 2)
filter.has(Buffer("foobar")) // false
filter.add(Buffer("foobar"))
filter.has(Buffer("foobar")) // true
filter.has(Buffer("hello world")) // false
var bloem = require('bloem')
var filter = new bloem.SafeBloem(2, 0.1)
filter.add(Buffer("1")) // true
filter.add(Buffer("2")) // true
filter.add(Buffer("3")) // false
filter.has(Buffer("3")) // false
filter.has(Buffer("1")) // true
size
Number - bits in the bitfieldslices
Number - how many hashfunctions to useCreate a new Bloem filter object.
key
Buffer - key to addAdd a key to the set
key
BufferTest if key is in the set
capacity
Number - capacity of the filtererror_rate
NumberCreate a new bloom filter that can hold capacity
elements with an error probability of error_rate
.
key
Buffer - key to addAdd a key to the set. Returnes true on success and false if the filter is full.
key
BufferTest if key is in the set
error_rate
NumberCreates an instance of a scaling bloom filter. Accepts a "options" Object that takes the following values:
initial_capacity
- the capacity of the first filter. Default: 1000scaling
- the scaling factor. Use 2 here for less space usage but higher cpu usage or 4 for higher space, but lower cpu usage. Default: 2ratio
- tightening ratio with 0 < ratio < 1. Default: 0.9key
Buffer - key to addAdd a key to the set
key
BufferTest if key is in the set
FAQs
Bloom Filter using the FNV hash function
The npm package bloem receives a total of 687 weekly downloads. As such, bloem popularity was classified as not popular.
We found that bloem 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
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.