This commit is contained in:
parent
45340d6825
commit
1349163ba5
2 changed files with 3 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" href="data:,">
|
||||
<script src="./script.js" defer></script>
|
||||
<script src="./script.js"></script>
|
||||
<title>dn724</title>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -15,6 +15,7 @@ function calculate(el) {
|
|||
result.innerText = cand;
|
||||
}
|
||||
|
||||
// https://github.com/bryc/code/blob/master/jshash/experimental/cyrb53.js
|
||||
const cyrb53 = (str, seed = 0) => {
|
||||
let h1 = 0xdeadbeef ^ seed, h2 = 0x41c6ce57 ^ seed;
|
||||
for (let i = 0, ch; i < str.length; i++) {
|
||||
|
@ -28,6 +29,4 @@ const cyrb53 = (str, seed = 0) => {
|
|||
h2 ^= Math.imul(h1 ^ (h1 >>> 13), 3266489909);
|
||||
|
||||
return 4294967296 * (2097151 & h2) + (h1 >>> 0);
|
||||
};
|
||||
|
||||
calculate(result); // this is necessary for parcel
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue