Fixup digest encoding