Bug 541781 - Support dynamically registered MessageDigest implementations

Extend o.e.e.p2.artifact.repository.artifactChecksums extension point
with attribute providerName to support custom MessageDigest
implementations as per Java Security API.

To get an instance of custom MessageDigest in ChecksumProducer's
getMessageDigest(String, String), look for service object under
java.security.Provider interface filtered by providerName property and
pass it to java.security.MessageDigest's getInstance(String,
Provider). Throws NoSuchProviderException if no such service was
found.

Bundle that contributes such implementation should register it with
the Framework service registry under interface
java.security.Provider. The registration properties of the service
should contain property 'providerName' with value of type String as
returned by implementation's java.security.Provider.getName(). The
same value should be used for providerName attribute in
artifactChecksums extension point.

o.e.equinox.p2.artifact.checksums.bouncycastle bundle demonstrates how
this works by adding support for Whirlpool and DSTU7564 message
digests using the Bouncy Castle Crypto APIs [1]. It is not part of the
distribution and used by unit tests only.

[1] https://bouncycastle.org/

Change-Id: I0cfd06ceca6e1911d69bab09331399500a00dcee
Signed-off-by: Mykola Nikishov <mn@mn.com.ua>
24 files changed