How to compute the keccak_256 hash for text?

We need to compute the keccak_256 hash for text, but only find TEXT fuction sha256.

sha256 is the only hash function provided in Daml and you cannot easily implement your own hash functions. I recommend to compute the hash off ledger and pass it in when you’re creating the contract or as a choice argument.