util: Add stateful digest

Change-Id: I6ed564dc9146d180cec2848a73ec9e8e8f10d921
Refs: #1934