question: public static byte [ ] digest ( InputStream data , MessageDigest messageDigest ) throws GeneralSecurityException , IOException { byte [ ] buf = new byte [ 8192 ] ; int n ; while ( ( n = data . read ( buf ) ) > 0 ) { messageDigest . update ( buf , 0 , n ) ; } return messageDigest . digest ( ) ; }
target:  Create a digest based on the inputstream.