ple, passing that input stream to another method
>> that wrote the content to a file then you wanted to get the digest after
>> the file write was complete.
>>
>>
>>
>> Jason
>>
>>
>>
>> *From:* Gerald Wiltse [mailto:jerrywil...@gmail.com]
&g
be dragons".bytes)
>
> println MessageDigest.getInstance("SHA1").digest(content.bytes).encodeHex()
>
>
>
> //If the content might be arbitrarily long:
>
> content = new ByteArrayInputStream("Here be dragons".bytes)
>
> def digest = MessageDigest.getInstanc
ties Maintenance*
>
> O: 858-831-2209
>
> C: 760-473-7542
>
> H: 760-930-0461
>
> erick.nel...@hdsupply.com
>
>
>
> *From:* Winnebeck, Jason [mailto:jason.winneb...@windstream.com]
> *Sent:* Friday, March 04, 2016 6:40 AM
> *To:* users@groovy.apache.org
>
-2209
C: 760-473-7542
H: 760-930-0461
erick.nel...@hdsupply.com<mailto:billy.polihrona...@hdsupply.com>
From: Winnebeck, Jason [mailto:jason.winneb...@windstream.com]
Sent: Friday, March 04, 2016 6:40 AM
To: users@groovy.apache.org
Subject: RE: Groovy Hash Calculations
Here is how I would do
le write was complete.
>
>
>
> Jason
>
>
>
> *From:* Gerald Wiltse [mailto:jerrywil...@gmail.com]
> *Sent:* Friday, March 04, 2016 10:08 AM
> *To:* users@groovy.apache.org
> *Subject:* Re: Groovy Hash Calculations
>
>
>
> I'm trying to verify the sha
the content to a file
then you wanted to get the digest after the file write was complete.
Jason
From: Gerald Wiltse [mailto:jerrywil...@gmail.com]
Sent: Friday, March 04, 2016 10:08 AM
To: users@groovy.apache.org
Subject: Re: Groovy Hash Calculations
I'm trying to verify the sha1 hash on a
gons".bytes)
>
> def digest = MessageDigest.getInstance("SHA1")
>
> content.eachByte(4096) { bytes, len ->
>
> digest.update(bytes, 0, len)
>
> }
>
> println digest.digest().encodeHex()
>
>
>
> Jason
>
>
>
> *From:* Gerald Wiltse [mailto:jerrywil.
9:18 AM
To: users@groovy.apache.org
Subject: Groovy Hash Calculations
Hello All,
I have this block, it's pretty compressed, just wondering if there is a more
groovy way to handle reading the buffer and computing the hash.
def messageDigest = MessageDigest.getInstance("S
Hello All,
I have this block, it's pretty compressed, just wondering if there is a
more groovy way to handle reading the buffer and computing the hash.
def messageDigest = MessageDigest.getInstance("SHA1")
def dis = new DigestInputStream(content, messageDigest)
byte[] buff