Class XMLSecurityConstants

java.lang.Object
org.apache.xml.security.stax.ext.XMLSecurityConstants

public class XMLSecurityConstants extends Object
XMLSecurityConstants for global use
  • Field Details

  • Constructor Details

    • XMLSecurityConstants

      protected XMLSecurityConstants()
  • Method Details

    • generateBytes

      public static byte[] generateBytes(int length) throws XMLSecurityException
      Generate bytes of the given length using the algorithm supplied in "org.apache.xml.security.securerandom.algorithm" or, if not specified, use a SecureRandom instance from default constructor. The SecureRandom instance that backs this method is cached for efficiency.
      Returns:
      a new byte array of the given length
      Throws:
      XMLSecurityException
    • setJaxbContext

      public static void setJaxbContext(jakarta.xml.bind.JAXBContext jaxbContext)
    • setJaxbSchemas

      public static void setJaxbSchemas(Schema schema)
    • getJaxbSchemas

      public static Schema getJaxbSchemas()
    • getJaxbUnmarshaller

      public static jakarta.xml.bind.Unmarshaller getJaxbUnmarshaller(boolean disableSchemaValidation) throws jakarta.xml.bind.JAXBException
      Throws:
      jakarta.xml.bind.JAXBException