Added close for the digest input stream and added a couple of comments.