R30 hash function