The Tangle hash function