You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Andreas Beeker (JIRA)" <ji...@apache.org> on 2014/12/26 00:00:13 UTC
[jira] [Created] (SANTUARIO-411) configure MessageDigest Provider /
add context property key constants
Andreas Beeker created SANTUARIO-411:
----------------------------------------
Summary: configure MessageDigest Provider / add context property key constants
Key: SANTUARIO-411
URL: https://issues.apache.org/jira/browse/SANTUARIO-411
Project: Santuario
Issue Type: Improvement
Security Level: Public (Public issues, viewable by everyone)
Components: Java
Affects Versions: Java 2.0.2
Reporter: Andreas Beeker
Assignee: Colm O hEigeartaigh
Priority: Minor
This is the patch as discussed on [1].
Originally I wanted to provide another context property to specify the MessageDigest Provider. So I've checked how the other properties are set and saw that the key strings a scattered through the code. As a user I would prefer to use a constant, maybe having some attached javadoc to it, therefore I've moved the strings to constants in the appropriated classes [2]
As MessageDigests are used also in other places, I've checked their creation and found the JceMapper class. So the patch centralized the MD creation in MessageDigestAlgorithm and now user code can overwrite the provider over JceMapper.setProviderID.
Andi.
[1] http://apache-xml-project.6118.n7.nabble.com/Custom-Security-Provider-for-DOMReference-td41569.html
[2] http://stackoverflow.com/questions/66066/what-is-the-best-way-to-implement-constants-in-java
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)