JavaScript Restrictor
Browser extension that improves privacy and security
Loading...
Searching...
No Matches
session_hash.js File Reference

A cache for session and domain hashes, used for Farbling. More...

Variables

var Hashes
 

Detailed Description

A cache for session and domain hashes, used for Farbling.

Author
Copyright (C) 2021 Matus Svancar
Copyright (C) 2021 Giorgio Maone
License:
SPDX-License-Identifier: GPL-3.0-or-later

Variable Documentation

◆ Hashes

var Hashes
Initial value:
= {
sessionHash : gen_random64().toString(),
visitedDomains : {},
getFor(url){
let site = getSiteForURL(url);
let domainHash = this.visitedDomains[site];
if (!domainHash) {
let hmac = sha256.hmac.create(this.sessionHash);
hmac.update(site);
domainHash = hmac.hex();
this.visitedDomains[site] = domainHash;
}
return {
};
}
}
var site
Definition popup.js:27
exports sha256
Definition sha256.js:511
exports sha256 hmac
Definition sha256.js:513
const domainHash
<reference path="../../common/wrappingS-GEO.js">
Definition wrappingS-GEO_tests.js:26

Object for generating and caching domain/session hashes getFor method used to get domain hashes from given url

Note
cached visited domains with related keys are only deleted after end of the session