input

// experiment with hashSize to see its effects on collisions

const GenHash = str => {
  const hashSize = 32
  if(typeof str == 'number') str = str.toString()
  const alphabet = 'abcdef0123456789'
         // 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  
  var ret = ''
  const initSeed = 9
  for(var i = 0; i < hashSize; 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;
}