Track EOF for channels so get message digest is only performed once.
Added more info to function documentation and comments