Examples of UnsyncBufferedOutputStream


Examples of com.sun.org.apache.xml.internal.security.utils.UnsyncBufferedOutputStream

        
         MessageDigestAlgorithm mda = this.getMessageDigestAlgorithm();

         mda.reset();
         DigesterOutputStream diOs=new DigesterOutputStream(mda);
         OutputStream os=new UnsyncBufferedOutputStream(diOs);
         XMLSignatureInput output=this.dereferenceURIandPerformTransforms(os);        
         output.updateOutputStream(os);
         os.flush();
         //this.getReferencedBytes(diOs);
         //mda.update(data);

         return diOs.getDigestValue();
      } catch (XMLSecurityException ex) {
View Full Code Here

Examples of com.sun.org.apache.xml.internal.security.utils.UnsyncBufferedOutputStream

            SignedInfo si = this.getSignedInfo();

            // generate digest values for all References in this SignedInfo
            si.generateDigestValues();
            OutputStream so=new UnsyncBufferedOutputStream(new SignerOutputStream(sa));
            try {
                so.close();
            } catch (IOException e) {
                //Imposible
            }
            // get the canonicalized bytes from SignedInfo
            si.signInOctectStream(so);
View Full Code Here

Examples of com.sun.org.apache.xml.internal.security.utils.UnsyncBufferedOutputStream

         }
         sa.initVerify(pk);

         // Get the canonicalized (normalized) SignedInfo
         SignerOutputStream so=new SignerOutputStream(sa);
         OutputStream bos=new UnsyncBufferedOutputStream(so);
         this._signedInfo.signInOctectStream(bos);
         try {
      bos.close();
    } catch (IOException e) {
      //Imposible
    }
        
         //retrieve the byte[] from the stored signature
View Full Code Here

Examples of com.sun.org.apache.xml.internal.security.utils.UnsyncBufferedOutputStream

        try {
            MessageDigestAlgorithm mda = this.getMessageDigestAlgorithm();

            mda.reset();
            DigesterOutputStream diOs = new DigesterOutputStream(mda);
            os = new UnsyncBufferedOutputStream(diOs);
            XMLSignatureInput output = this.dereferenceURIandPerformTransforms(os);
            // if signing and c14n11 property == true explicitly add
            // C14N11 transform if needed
            if (Reference.useC14N11 && !validating && !output.isOutputStreamSet()
                && !output.isOctetStream()) {
View Full Code Here

Examples of com.sun.org.apache.xml.internal.security.utils.UnsyncBufferedOutputStream

                // initialize SignatureAlgorithm for signing
                sa.initSign(signingKey);

                // generate digest values for all References in this SignedInfo
                si.generateDigestValues();
                so = new UnsyncBufferedOutputStream(new SignerOutputStream(sa));
                // get the canonicalized bytes from SignedInfo
                si.signInOctetStream(so);
            } catch (XMLSecurityException ex) {
                throw ex;
            } finally {
View Full Code Here

Examples of com.sun.org.apache.xml.internal.security.utils.UnsyncBufferedOutputStream

            try {
                sa.initVerify(pk);

                // Get the canonicalized (normalized) SignedInfo
                SignerOutputStream so = new SignerOutputStream(sa);
                OutputStream bos = new UnsyncBufferedOutputStream(so);

                si.signInOctetStream(bos);
                bos.close();
                // retrieve the byte[] from the stored signature
                sigBytes = this.getSignatureValue();
            } catch (IOException ex) {
                if (log.isLoggable(java.util.logging.Level.FINE)) {
                    log.log(java.util.logging.Level.FINE, ex.getMessage(), ex);
View Full Code Here

Examples of com.sun.org.apache.xml.internal.security.utils.UnsyncBufferedOutputStream

         MessageDigestAlgorithm mda = this.getMessageDigestAlgorithm();

         mda.reset();
         DigesterOutputStream diOs=new DigesterOutputStream(mda);
         OutputStream os=new UnsyncBufferedOutputStream(diOs);
         XMLSignatureInput output=this.dereferenceURIandPerformTransforms(os);
         // if signing and c14n11 property == true explicitly add
         // C14N11 transform if needed
         if (this.useC14N11 && !validating &&
             !output.isOutputStreamSet() && !output.isOctetStream()) {
             if (transforms == null) {
                 transforms = new Transforms(this._doc);
                 this._constructionElement.insertBefore
                     (transforms.getElement(), digestMethodElem);
             }
             transforms.addTransform(Transforms.TRANSFORM_C14N11_OMIT_COMMENTS);
             output.updateOutputStream(os, true);
         } else {
             output.updateOutputStream(os);
         }
         os.flush();
         //this.getReferencedBytes(diOs);
         //mda.update(data);

         return diOs.getDigestValue();
      } catch (XMLSecurityException ex) {
View Full Code Here

Examples of com.sun.org.apache.xml.internal.security.utils.UnsyncBufferedOutputStream

            // initialize SignatureAlgorithm for signing
            sa.initSign(signingKey);

            // generate digest values for all References in this SignedInfo
            si.generateDigestValues();
            OutputStream so=new UnsyncBufferedOutputStream(new SignerOutputStream(sa));
            try {
                so.close();
            } catch (IOException e) {
                //Imposible
            }
            // get the canonicalized bytes from SignedInfo
            si.signInOctectStream(so);
View Full Code Here

Examples of com.sun.org.apache.xml.internal.security.utils.UnsyncBufferedOutputStream

         }
         sa.initVerify(pk);

         // Get the canonicalized (normalized) SignedInfo
         SignerOutputStream so=new SignerOutputStream(sa);
         OutputStream bos=new UnsyncBufferedOutputStream(so);
         si.signInOctectStream(bos);
         try {
                bos.close();
         } catch (IOException e) {
                //Imposible
         }

         //retrieve the byte[] from the stored signature
View Full Code Here

Examples of org.apache.xml.security.utils.UnsyncBufferedOutputStream

            dos = new DigesterOutputStream(md);
        }
        OutputStream os = null;
        Data data = dereferencedData;
        try {
            os = new UnsyncBufferedOutputStream(dos);
            for (int i = 0, size = transforms.size(); i < size; i++) {
                DOMTransform transform = (DOMTransform)transforms.get(i);
                if (i < size - 1) {
                    data = transform.transform(data, context);
                } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.