Returns a byte array representing an SHA-1 digest of the supplied stream.
This method closes the supplied stream.
Parameters: stream - The stream to be digested A byte array holding the required digest. exception: IOException - if an I/O error occurs.