[CODEC-210] Add DigestUtils.getDigest(String, MessageDigest) - ASF Jira (original) (raw)
- Type:
New Feature
- Status: Closed
- Priority:
Major
- Resolution: Fixed
- Affects Version/s: None
- Fix Version/s: 1.11
- Environment:
Hide
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)
Maven home: E:\Java\apache-maven-3.3.9\bin\..
Java version: 1.7.0_79, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_79\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Show
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00) Maven home: E:\Java\apache-maven-3.3.9\bin\.. Java version: 1.7.0_79, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.7.0_79\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Add DigestUtils.getDigest(String algo, MessageDigest):
/**
* Returns a <code>MessageDigest</code> for the given <code>algorithm</code> or a default if there is a problem getting the algorithm.
*
* @param algorithm
* the name of the algorithm requested. See <a
* href="http:
* >Appendix A in the Java Cryptography Architecture Reference Guide</a> for information about standard
* algorithm names.
* @param defaultMessageDigest The default MessageDigest.
* @return A digest instance.
* @see MessageDigest#getInstance(String)
* @throws IllegalArgumentException
* when a {@link NoSuchAlgorithmException} is caught.
* @since 1.11
*/