JavaScript Restrictor
Browser extension that improves privacy and security
|
Wrappers for Web Audio API. More...
Functions | |
function | pseudoRandomSequence (seed) |
seeded pseudo random sequence using lfsr_next32 More... | |
function | audioFarble (arr) |
Modifies audio data. More... | |
add_wrappers (wrappers) | |
Variables | |
var | audioFarbleBody = strToUint + lfsr_next32 + pseudoRandomSequence + audioFarble |
var | wrappers |
Wrappers for Web Audio API.
This file contains wrappers for AudioBuffer and AnalyserNode related calls
The goal is to prevent fingerprinting by modifying the values from functions which are reading/copying from AudioBuffer and AnalyserNode. So the audio content of wrapped objects is the same as intended.
The modified content can be either a white noise based on domain key or a fake audio data that is modified according to domain key to be different than the original albeit very similar (i.e. the approach inspired by the algorithms created by Brave Software https://brave.com available at https://github.com/brave/brave-core/blob/master/chromium_src/third_party/blink/renderer/core/execution_context/execution_context.cc.)
add_wrappers | ( | wrappers | wrappers | ) |
Adds a list of wrapping objects to the build_wrapping_code.
This function is called from each wrapper in its file.
function audioFarble | ( | arr | ) |
Modifies audio data.
arr | typed array with data - Uint8Array or Float32Array |
Depending on level chosen this function modifies arr content:
function pseudoRandomSequence | ( | seed | ) |
seeded pseudo random sequence using lfsr_next32
seed | Number used as seed at first call |
String audioFarbleBody = strToUint + lfsr_next32 + pseudoRandomSequence + audioFarble |
Contains functions for modyfing audio data according to chosen level of protection - (0) - replace by white noise (range <0,0.1>) based on domain key (1) - multiply array by fudge factor based on domain key
var wrappers |