Search in sources :

Example 1 with Canonicalizer20010315OmitComments

use of com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315OmitComments in project jdk8u_jdk by JetBrains.

the class TransformC14N method enginePerformTransform.

protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, OutputStream os, Transform transformObject) throws CanonicalizationException {
    Canonicalizer20010315OmitComments c14n = new Canonicalizer20010315OmitComments();
    if (os != null) {
        c14n.setWriter(os);
    }
    byte[] result = null;
    result = c14n.engineCanonicalize(input);
    XMLSignatureInput output = new XMLSignatureInput(result);
    if (os != null) {
        output.setOutputStream(os);
    }
    return output;
}
Also used : Canonicalizer20010315OmitComments(com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315OmitComments) XMLSignatureInput(com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput)

Example 2 with Canonicalizer20010315OmitComments

use of com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315OmitComments in project jdk8u_jdk by JetBrains.

the class XMLSignatureInput method getBytes.

/**
     * Returns the byte array from input which was specified as the parameter of
     * {@link XMLSignatureInput} constructor
     *
     * @return the byte[] from input which was specified as the parameter of
     * {@link XMLSignatureInput} constructor
     *
     * @throws CanonicalizationException
     * @throws IOException
     */
public byte[] getBytes() throws IOException, CanonicalizationException {
    byte[] inputBytes = getBytesFromInputStream();
    if (inputBytes != null) {
        return inputBytes;
    }
    Canonicalizer20010315OmitComments c14nizer = new Canonicalizer20010315OmitComments();
    bytes = c14nizer.engineCanonicalize(this);
    return bytes;
}
Also used : Canonicalizer20010315OmitComments(com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315OmitComments)

Aggregations

Canonicalizer20010315OmitComments (com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315OmitComments)2 XMLSignatureInput (com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput)1