GitHub user sesuncedu opened a pull request:

    https://github.com/apache/commons-codec/pull/8

    Add methods to DigestUtils to generate hex from MessageDigest et. al. 

    *This PR replaces #7 which was associated with the wrong issue number*
    This PR adds methods to DigestUtils to make it easy to generate hexadecimal 
strings from: 
    - MessageDigest, 
    - DigestInputStream,
    - DigestOutputStream.
    
      If the underlying digest supports ```clone()```,  a clone is created 
before calling ```MessageDigest::digest``` to avoid resetting the state.  If 
this cannot be done, the original digest is used.
    
    [Although clone is optional for MessageDigests, it seems to be almost 
universally supported (e.g. both the Sun and the IBM  providers implement clone 
for their concrete digests) ]
    
    Signed-off-by: Simon Spero <[email protected]>

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sesuncedu/commons-codec CODEC-238

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-codec/pull/8.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #8
    
----
commit e83cea6d26c0a74c4dcca8bc3e04f8ca7a1593b7
Author: Simon Spero <[email protected]>
Date:   2017-07-04T20:15:28Z

    Add methods to DigestUtils to generate a hexadecimal string from a 
MessageDigest, a DigestInputStream, or a DigestOutputStream.  If the underlying 
digest implementation implements clone, a clone will be created before 
extracting the digest to avoid resetting it.
    
    Signed-off-by: Simon Spero <[email protected]>

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to