Class XMLSecurityUtils


  • public class XMLSecurityUtils
    extends java.lang.Object
    • Field Detail

      • MAX_SYMMETRIC_KEY_SIZE

        private static final int MAX_SYMMETRIC_KEY_SIZE
        See Also:
        Constant Field Values
    • Constructor Detail

      • XMLSecurityUtils

        protected XMLSecurityUtils()
    • Method Detail

      • dropReferenceMarker

        public static java.lang.String dropReferenceMarker​(java.lang.String reference)
        Returns the Id reference without the leading #
        Parameters:
        reference - The reference on which to drop the #
        Returns:
        The reference without a leading #
      • getXMLEventAsString

        public static java.lang.String getXMLEventAsString​(XMLSecEvent xmlSecEvent)
        Returns the XMLEvent type in String form
        Parameters:
        xmlSecEvent -
        Returns:
        The XMLEvent type as string representation
      • getType

        public static <T> T getType​(java.util.List<java.lang.Object> objects,
                                    java.lang.Class<T> clazz)
      • getQNameType

        public static <T> T getQNameType​(java.util.List<java.lang.Object> objects,
                                         javax.xml.namespace.QName qName)
      • getQNameAttribute

        public static java.lang.String getQNameAttribute​(java.util.Map<javax.xml.namespace.QName,​java.lang.String> attributes,
                                                         javax.xml.namespace.QName qName)
      • getExcC14NInclusiveNamespacePrefixes

        public static java.util.Set<java.lang.String> getExcC14NInclusiveNamespacePrefixes​(XMLSecStartElement xmlSecStartElement,
                                                                                           boolean excludeVisible)
      • copy

        public static void copy​(java.io.InputStream inputStream,
                                java.io.OutputStream outputStream)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • prepareSecretKey

        public static javax.crypto.SecretKey prepareSecretKey​(java.lang.String symEncAlgo,
                                                              byte[] rawKey)
        Convert the raw key bytes into a SecretKey object of type symEncAlgo.
      • loadXMLSecuritySchemas

        public static javax.xml.validation.Schema loadXMLSecuritySchemas()
                                                                  throws org.xml.sax.SAXException
        Throws:
        org.xml.sax.SAXException