org.apache.xml.security.stax.ext
Class XMLSecurityUtils
java.lang.Object
org.apache.xml.security.stax.ext.XMLSecurityUtils
public class XMLSecurityUtils
- extends Object
- Version:
- $Revision: 1534652 $ $Date: 2013-10-22 16:06:09 +0100 (Tue, 22 Oct 2013) $
- Author:
- $Author: coheigea $
Method Summary |
static void |
copy(InputStream inputStream,
OutputStream outputStream)
|
static void |
createKeyValueTokenStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
|
static TokenSecurityEvent<? extends InboundSecurityToken> |
createTokenSecurityEvent(InboundSecurityToken inboundSecurityToken,
String correlationID)
|
static void |
createX509CertificateStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
|
static void |
createX509IssuerSerialStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
|
static void |
createX509SubjectKeyIdentifierStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
|
static void |
createX509SubjectNameStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
|
static String |
dropReferenceMarker(String reference)
Returns the Id reference without the leading # |
static Set<String> |
getExcC14NInclusiveNamespacePrefixes(XMLSecStartElement xmlSecStartElement,
boolean excludeVisible)
|
static String |
getQNameAttribute(Map<QName,String> attributes,
QName qName)
|
static
|
getQNameType(List<Object> objects,
QName qName)
|
static Transformer |
getTransformer(Object methodParameter1,
Object methodParameter2,
String algorithm,
XMLSecurityConstants.DIRECTION direction)
|
static
|
getType(List<Object> objects,
Class<T> clazz)
|
static String |
getXMLEventAsString(XMLSecEvent xmlSecEvent)
Returns the XMLEvent type in String form |
static Class<?> |
loadClass(String className)
|
static SecretKey |
prepareSecretKey(String symEncAlgo,
byte[] rawKey)
Convert the raw key bytes into a SecretKey object of type symEncAlgo. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLSecurityUtils
protected XMLSecurityUtils()
dropReferenceMarker
public static String dropReferenceMarker(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 String getXMLEventAsString(XMLSecEvent xmlSecEvent)
- Returns the XMLEvent type in String form
- Parameters:
xmlSecEvent
-
- Returns:
- The XMLEvent type as string representation
loadClass
public static Class<?> loadClass(String className)
throws ClassNotFoundException
- Throws:
ClassNotFoundException
getTransformer
public static Transformer getTransformer(Object methodParameter1,
Object methodParameter2,
String algorithm,
XMLSecurityConstants.DIRECTION direction)
throws XMLSecurityException
- Throws:
XMLSecurityException
getType
public static <T> T getType(List<Object> objects,
Class<T> clazz)
getQNameType
public static <T> T getQNameType(List<Object> objects,
QName qName)
getQNameAttribute
public static String getQNameAttribute(Map<QName,String> attributes,
QName qName)
createKeyValueTokenStructure
public static void createKeyValueTokenStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
throws XMLStreamException,
XMLSecurityException
- Throws:
XMLStreamException
XMLSecurityException
createX509SubjectKeyIdentifierStructure
public static void createX509SubjectKeyIdentifierStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
throws XMLSecurityException,
XMLStreamException
- Throws:
XMLSecurityException
XMLStreamException
createX509CertificateStructure
public static void createX509CertificateStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
throws XMLSecurityException,
XMLStreamException
- Throws:
XMLSecurityException
XMLStreamException
createX509SubjectNameStructure
public static void createX509SubjectNameStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
throws XMLSecurityException,
XMLStreamException
- Throws:
XMLSecurityException
XMLStreamException
createX509IssuerSerialStructure
public static void createX509IssuerSerialStructure(AbstractOutputProcessor abstractOutputProcessor,
OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
throws XMLStreamException,
XMLSecurityException
- Throws:
XMLStreamException
XMLSecurityException
createTokenSecurityEvent
public static TokenSecurityEvent<? extends InboundSecurityToken> createTokenSecurityEvent(InboundSecurityToken inboundSecurityToken,
String correlationID)
throws XMLSecurityException
- Throws:
XMLSecurityException
getExcC14NInclusiveNamespacePrefixes
public static Set<String> getExcC14NInclusiveNamespacePrefixes(XMLSecStartElement xmlSecStartElement,
boolean excludeVisible)
copy
public static void copy(InputStream inputStream,
OutputStream outputStream)
throws IOException
- Throws:
IOException
prepareSecretKey
public static SecretKey prepareSecretKey(String symEncAlgo,
byte[] rawKey)
- Convert the raw key bytes into a SecretKey object of type symEncAlgo.
Copyright © 2000–2013 The Apache Software Foundation. All rights reserved.