hash algo tester
input
const GenHash = str => { const hashSize = 32 if(typeof str == 'number') str = str.toString() const alphabet = 'abcdef0123456789' // 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' var ret = '' const initSeed = 9 Array(hashSize).fill().map((v, i) => { n = initSeed n += ((i+99) ** 2.456 | 0) str.split('').forEach((chr, idx) => { n += (chr.charCodeAt(0) * (i+1+idx)) ** 2.1 | 0 n %= alphabet.length }) n %= alphabet.length ret += alphabet[n] }) return ret; }
run tests
stop tests