JS backend: generate hashCode