Fixed ETag filtering

Fixed https://github.com/ClearURLs/Addon/issues/276
This commit is contained in:
Kevin R
2022-11-26 00:21:23 +01:00
parent f1056cd778
commit a32708dcd1
2 changed files with 31 additions and 3 deletions

View File

@@ -328,3 +328,12 @@ async function sha256(message) {
return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');
}
/**
* Generates a non-secure random ASCII string of length {@code len}.
*
* @returns non-secure random ASCII
*/
function randomASCII(len) {
return [...Array(len)].map(() => (~~(Math.random() * 36)).toString(36)).join('');
}