How to compute the keccak_256 hash for text?
App Development2 posts239 viewsLast activity Jan 2023
KA
Kaizhao_ShiOP
Jan 2023We need to compute the keccak_256 hash for text, but only find TEXT fuction sha256.
CO
cocreature
Jan 2023sha256 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.