public class

DefaultMessageDigestProvider

extends Object
implements MessageDigestEngineProvider
java.lang.Object
   ↳ xades4j.providers.impl.DefaultMessageDigestProvider

Class Overview

The default implementation of MessageDigestEngineProvider. It supports the default digest algorithms in the Java platform, namely:

  • http://www.w3.org/2000/09/xmldsig#sha1 - SHA-1
  • http://www.w3.org/2001/04/xmlenc#sha256 - SHA-256
  • http://www.w3.org/2001/04/xmldsig-more#sha384 - SHA-384
  • http://www.w3.org/2001/04/xmlenc#sha512 - SHA-512

Summary

Public Constructors
DefaultMessageDigestProvider(String messageDigestProvider)
Initializes a new instance that will use the specified JCE provider to get MessageDigest instances.
DefaultMessageDigestProvider()
Initializes a new instance that will get MessageDigests without specifying a JCE provider.
Public Methods
MessageDigest getEngine(String digestAlgorithmURI)
Gets a MessageDigest engine for the algorithm identified by the given URI.
[Expand]
Inherited Methods
From class java.lang.Object
From interface xades4j.providers.MessageDigestEngineProvider

Public Constructors

public DefaultMessageDigestProvider (String messageDigestProvider)

Initializes a new instance that will use the specified JCE provider to get MessageDigest instances.

Parameters
messageDigestProvider the JCE provider for MessageDigest
Throws
NoSuchProviderException if the JCE provider is not installed

public DefaultMessageDigestProvider ()

Initializes a new instance that will get MessageDigests without specifying a JCE provider.

Public Methods

public MessageDigest getEngine (String digestAlgorithmURI)

Gets a MessageDigest engine for the algorithm identified by the given URI. The URIs defined in the XML-DSIG specification are used.

Parameters
digestAlgorithmURI the URI of the digest algorithm
Returns
  • the message digest engine