Package xades4j.utils

Class CanonicalizerUtils

java.lang.Object
xades4j.utils.CanonicalizerUtils

public final class CanonicalizerUtils extends Object
Provides some utility methods for Canonicalization.
Author:
Emmanuelle, luis
  • Constructor Details

    • CanonicalizerUtils

      public CanonicalizerUtils()
  • Method Details

    • checkC14NAlgorithm

      public static void checkC14NAlgorithm(Algorithm c14n) throws UnsupportedAlgorithmException
      Verifies input C14N Algorithm is in fact a C14N Algorithm by querying the default Apache Canonicalizer.
      Parameters:
      c14n - - A C14N algorithm.
      Throws:
      UnsupportedAlgorithmException - - If the URI is not registered in the default Canonicalizer.
    • allTransformsAreC14N

      public static boolean allTransformsAreC14N(org.apache.xml.security.signature.Reference r) throws org.apache.xml.security.exceptions.XMLSecurityException
      Checks if all the transforms in a ds:Reference are canonicalization transforms.
      Parameters:
      r - the reference
      Returns:
      true if all transforms are c14n, false otherwise.
      Throws:
      org.apache.xml.security.exceptions.XMLSecurityException