digest: fix digestinit failing on first invocation