Add payload digest creation and hash functions.