Java Reference
In-Depth Information
MessageDigest.getInstance(“MD5”)
APPLICATION
MD5 MessageDigest from Provider
WE45
PROVIDER FRAMEWORK
Message
Digest
MD5
SHA-512
Message
Digest
MD5
SHA-1
Message
Digest
MD5
SHA-256
Provider WE45
Provider X
Provider Y
Figure 8.11
Request for the MD5 hashing algorithm function from provider We45.
Let's understand how it works in the actual Java implementation scenario. In Figure 8.11, the
developer through the Web application is requesting an MD5 message digest implementation.
Let's assume that, in this case, the application developer has access to multiple message digest
algorithms (MD5, SHA-1, SHA-256, and SHA-512) and the providers are ordered by prefer-
ence, from left to right (1-3). In such a case, when an application requests an MD5 algorithm
implementation without specifying a provider name, the CSPs are searched in preference order
and the implementation from the irst provider supplying that particular algorithm—in this case,
We45MD5—is returned.
In Figure 8.12, the developer requests, through the Web application, the MD5 algorithm imple-
mentation from a speciic provider, We45MD5. his time the implementation from We45MD5
is returned, even though a provider with a higher preference order, ProviderB, also provides an
equivalent MD5 implementation.
8.3.5 Core Classes, Interfaces, and Algorithms of JCA
he core classes, interfaces, and algorithms in JCA can be classiied as follows:
Provider and Security classes
he engine classes and algorithms
he
he key interfaces and classes
he classes and interfaces for algorithm parameter speciication and key speciication
Miscellaneous and utility classes
 
Search WWH ::




Custom Search