-Fixed the shortening of the digest to conform with the requirements
-made the buffered reader close at the end of the method