commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sesuncedu <>
Subject [GitHub] commons-codec pull request #7: CODEC-224 Add methods to DigestUtils to gener...
Date Tue, 04 Jul 2017 20:37:12 GMT
GitHub user sesuncedu opened a pull request:

    CODEC-224 Add methods to DigestUtils to generate hex from MessageDigests et al. 

    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 <>

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

    $ git pull CODEC-224

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

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

    This closes #7
commit e83cea6d26c0a74c4dcca8bc3e04f8ca7a1593b7
Author: Simon Spero <>
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 <>


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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message