Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xml.security.algorithms
Class MessageDigestAlgorithm

    java.lang.Object
      org.apache.xml.security.utils.ElementProxy
          org.apache.xml.security.utils.SignatureElementProxy
              org.apache.xml.security.algorithms.Algorithm
                  org.apache.xml.security.algorithms.MessageDigestAlgorithm

    public class MessageDigestAlgorithm

extends Algorithm

Digest Message wrapper & selector class.

     MessageDigestAlgorithm.getInstance()

Field Summary
`static java.lang.String` | `ALGO_ID_DIGEST_NOT_RECOMMENDED_MD5` Message Digest - NOT RECOMMENDED MD5
`static java.lang.String` | `ALGO_ID_DIGEST_RIPEMD160` Message Digest - OPTIONAL RIPEMD-160
`static java.lang.String` | `ALGO_ID_DIGEST_SHA1` Digest - Required SHA1
`static java.lang.String` | `ALGO_ID_DIGEST_SHA256` Message Digest - RECOMMENDED SHA256
`static java.lang.String` | `ALGO_ID_DIGEST_SHA384` Message Digest - OPTIONAL SHA384
`static java.lang.String` | `ALGO_ID_DIGEST_SHA512` Message Digest - OPTIONAL SHA512

Fields inherited from class org.apache.xml.security.utils.ElementProxy
`baseURI, constructionElement, doc, log`

Method Summary
`byte[]` | `digest()` Proxy method for `MessageDigest.digest()` which is executed on the internal `MessageDigest` object.
`byte[]` | `digest(byte[] input)` Proxy method for `MessageDigest.digest(byte[])` which is executed on the internal `MessageDigest` object.
`int` | `digest(byte[] buf, int offset, int len)` Proxy method for `MessageDigest.digest(byte[], int, int)` which is executed on the internal `MessageDigest` object.
`java.security.MessageDigest` | `getAlgorithm()` Returns the actual `MessageDigest` algorithm object
`java.lang.String` | `getBaseLocalName()` Returns the localname of the Elements of the sub-class.
`java.lang.String` | `getBaseNamespace()` Returns the namespace of the Elements of the sub-class.
`int` | `getDigestLength()` Proxy method for `MessageDigest.getDigestLength()` which is executed on the internal `MessageDigest` object.
`static MessageDigestAlgorithm` | `getInstance(org.w3c.dom.Document doc, java.lang.String algorithmURI)` Factory method for constructing a message digest algorithm by name.
`java.lang.String` | `getJCEAlgorithmString()` Proxy method for `MessageDigest.getAlgorithm()` which is executed on the internal `MessageDigest` object.
`java.security.Provider` | `getJCEProvider()` Proxy method for `MessageDigest.getProvider()` which is executed on the internal `MessageDigest` object.
`static boolean` | `isEqual(byte[] digesta, byte[] digestb)` Proxy method for `MessageDigest.isEqual(byte[], byte[])` which is executed on the internal `MessageDigest` object.
`void` | `reset()` Proxy method for `MessageDigest.reset()` which is executed on the internal `MessageDigest` object.
`void` | `update(byte input)` Proxy method for `MessageDigest.update(byte)` which is executed on the internal `MessageDigest` object.
`void` | `update(byte[] input)` Proxy method for `MessageDigest.update(byte[])` which is executed on the internal `MessageDigest` object.
`void` | `update(byte[] buf, int offset, int len)` Proxy method for `MessageDigest.update(byte[], int, int)` which is executed on the internal `MessageDigest` object.

Methods inherited from class org.apache.xml.security.algorithms.Algorithm
`getAlgorithmURI, setAlgorithmURI`

Methods inherited from class org.apache.xml.security.utils.ElementProxy
`addBase64Element, addBase64Text, addBigIntegerElement, addText, addTextElement, createElementForFamily, createElementForFamilyLocal, getBaseURI, getBigIntegerFromChildElement, getBytesFromChildElement, getBytesFromTextChild, getDefaultPrefix, getDocument, getElement, getElementPlusReturns, getTextFromChildElement, getTextFromTextChild, length, registerDefaultPrefixes, setDefaultPrefix, setElement, setXPathNamespaceContext`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ALGO_ID_DIGEST_NOT_RECOMMENDED_MD5

    public static final java.lang.String ALGO_ID_DIGEST_NOT_RECOMMENDED_MD5

  Message Digest - NOT RECOMMENDED MD5

  See Also:
    Constant Field Values

### ALGO_ID_DIGEST_SHA1

    public static final java.lang.String ALGO_ID_DIGEST_SHA1

  Digest - Required SHA1

  See Also:
    Constant Field Values

### ALGO_ID_DIGEST_SHA256

    public static final java.lang.String ALGO_ID_DIGEST_SHA256

  Message Digest - RECOMMENDED SHA256

  See Also:
    Constant Field Values

### ALGO_ID_DIGEST_SHA384

    public static final java.lang.String ALGO_ID_DIGEST_SHA384

  Message Digest - OPTIONAL SHA384

  See Also:
    Constant Field Values

### ALGO_ID_DIGEST_SHA512

    public static final java.lang.String ALGO_ID_DIGEST_SHA512

  Message Digest - OPTIONAL SHA512

  See Also:
    Constant Field Values

### ALGO_ID_DIGEST_RIPEMD160

    public static final java.lang.String ALGO_ID_DIGEST_RIPEMD160

  Message Digest - OPTIONAL RIPEMD-160

  See Also:
    Constant Field Values

Method Detail

### getInstance

    public static MessageDigestAlgorithm getInstance(org.w3c.dom.Document doc,
                                                     java.lang.String algorithmURI)
                                              throws XMLSignatureException

  Factory method for constructing a message digest algorithm by name.

  Parameters:
    `doc` -
    `algorithmURI` -
  Returns:
    The MessageDigestAlgorithm element to attach in document and to digest
  Throws:
    `XMLSignatureException`

### getAlgorithm

    public java.security.MessageDigest getAlgorithm()

  Returns the actual `MessageDigest` algorithm object

  Returns:
    the actual `MessageDigest` algorithm object

### isEqual

    public static boolean isEqual(byte[] digesta,
                                  byte[] digestb)

  Proxy method for `MessageDigest.isEqual(byte[], byte[])` which is executed on the internal `MessageDigest` object.

  Parameters:
    `digesta` -
    `digestb` -
  Returns:
    the result of the `MessageDigest.isEqual(byte[], byte[])` method

### digest

    public byte[] digest()

  Proxy method for `MessageDigest.digest()` which is executed on the internal `MessageDigest` object.

  Returns:
    the result of the `MessageDigest.digest()` method

### digest

    public byte[] digest(byte[] input)

  Proxy method for `MessageDigest.digest(byte[])` which is executed on the internal `MessageDigest` object.

  Parameters:
    `input` -
  Returns:
    the result of the `MessageDigest.digest(byte[])` method

### digest

    public int digest(byte[] buf,
                      int offset,
                      int len)
               throws java.security.DigestException

  Proxy method for `MessageDigest.digest(byte[], int, int)` which is executed on the internal `MessageDigest` object.

  Parameters:
    `buf` -
    `offset` -
    `len` -
  Returns:
    the result of the `MessageDigest.digest(byte[], int, int)` method
  Throws:
    `java.security.DigestException`

### getJCEAlgorithmString

    public java.lang.String getJCEAlgorithmString()

  Proxy method for `MessageDigest.getAlgorithm()` which is executed on the internal `MessageDigest` object.

  Returns:
    the result of the `MessageDigest.getAlgorithm()` method

### getJCEProvider

    public java.security.Provider getJCEProvider()

  Proxy method for `MessageDigest.getProvider()` which is executed on the internal `MessageDigest` object.

  Returns:
    the result of the `MessageDigest.getProvider()` method

### getDigestLength

    public int getDigestLength()

  Proxy method for `MessageDigest.getDigestLength()` which is executed on the internal `MessageDigest` object.

  Returns:
    the result of the `MessageDigest.getDigestLength()` method

### reset

    public void reset()

  Proxy method for `MessageDigest.reset()` which is executed on the internal `MessageDigest` object.

### update

    public void update(byte[] input)

  Proxy method for `MessageDigest.update(byte[])` which is executed on the internal `MessageDigest` object.

  Parameters:
    `input` -

### update

    public void update(byte input)

  Proxy method for `MessageDigest.update(byte)` which is executed on the internal `MessageDigest` object.

  Parameters:
    `input` -

### update

    public void update(byte[] buf,
                       int offset,
                       int len)

  Proxy method for `MessageDigest.update(byte[], int, int)` which is executed on the internal `MessageDigest` object.

  Parameters:
    `buf` -
    `offset` -
    `len` -

### getBaseNamespace

    public java.lang.String getBaseNamespace()

  Description copied from class: `ElementProxy`
  Returns the namespace of the Elements of the sub-class.

  Overrides:
    `getBaseNamespace` in class `SignatureElementProxy`
  Returns:
    the namespace of the Elements of the sub-class.

### getBaseLocalName

    public java.lang.String getBaseLocalName()

  Description copied from class: `ElementProxy`
  Returns the localname of the Elements of the sub-class.

  Specified by:
    `getBaseLocalName` in class `ElementProxy`
  Returns:
    the localname of the Elements of the sub-class.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD