openssl dgst, openssl enc: check for end of input