Examples of newReference()


Examples of javax.xml.crypto.dsig.XMLSignatureFactory.newReference()

 
      List<Reference> references = new ArrayList<Reference>();
      references.add(signFactory.newReference("",sha1DigestMethod,transforms,null,null));
 
      for (EbMSDataSource dataSource : dataSources)
        references.add(signFactory.newReference("cid:" + dataSource.getContentId(),sha1DigestMethod,Collections.emptyList(),null,null,DigestUtils.sha(IOUtils.toByteArray(dataSource.getInputStream()))));
 
      SignedInfo signedInfo = signFactory.newSignedInfo(signFactory.newCanonicalizationMethod(CanonicalizationMethod.INCLUSIVE,(C14NMethodParameterSpec)null),signFactory.newSignatureMethod(SignatureMethod.RSA_SHA1,null),references);
 
      List<XMLStructure> keyInfoElements = new ArrayList<XMLStructure>();
      KeyInfoFactory keyInfoFactory = signFactory.getKeyInfoFactory();
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.newReference()

    XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM", new XMLDSigRI());

    // Step 2: Decide on a digest method and create the reference object. We
    // use the XMLSignatureFactory instance created in the first step to
    // create both the DigestMethod and Reference objects.
    Reference ref = fac.newReference("#invoice", fac.newDigestMethod(DigestMethod.SHA256, null));

    // Step 3: Load invoice.xml and wrap it in an XMLObject object. Not all
    // signature generation processes require this step. XMLObject in
    // JSR-105 models the optional Object element we briefly discussed
    // before.
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.newReference()

    // generate the enveloped signature.
    XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM", new XMLDSigRI());

    // Step 2 : Create a Reference to a remote PDF file
    // and also specify the SHA256 digest algorithm
    Reference ref = fac.newReference("http://www.actstudent.org/plan/pdf/sample.pdf", fac.newDigestMethod(DigestMethod.SHA256, null));

    // Step 3 : Create the SignedInfo.
    SignedInfo si = fac.newSignedInfo(fac.newCanonicalizationMethod(CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS, (C14NMethodParameterSpec) null),
        fac.newSignatureMethod(SignatureMethod.DSA_SHA1, null), Collections.singletonList(ref));
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.newReference()

    // Step 2 : Create a Reference to the enveloped document (in this case,
    // you are signing the whole document, so a URI of "" signifies
    // that, and also specify the SHA256 digest algorithm and
    // the ENVELOPED Transform.
    Reference ref = fac.newReference("", fac.newDigestMethod(DigestMethod.SHA256, null), Collections.singletonList(fac.newTransform(Transform.ENVELOPED, (TransformParameterSpec) null)), null,
        null);

    // Step 3 : Create the SignedInfo.
    SignedInfo si = fac.newSignedInfo(fac.newCanonicalizationMethod(CanonicalizationMethod.INCLUSIVE, (C14NMethodParameterSpec) null), fac.newSignatureMethod(SignatureMethod.DSA_SHA1, null),
        Collections.singletonList(ref));
View Full Code Here

Examples of org.apache.qpid.server.message.AMQMessage.newReference()

            try
            {
                final boolean immediate = _incommingMessage.isImmediate();

                final AMQMessage amqMessage = createAMQMessage(_incommingMessage);
                MessageReference ref = amqMessage.newReference();

                for(int i = 0; i < _destinationQueues.size(); i++)
                {
                    BaseQueue queue = _destinationQueues.get(i);
View Full Code Here

Examples of org.apache.qpid.server.message.AMQMessage.newReference()

            try
            {
                final boolean immediate = _incommingMessage.isImmediate();

                final AMQMessage amqMessage = createAMQMessage(_incommingMessage);
                MessageReference ref = amqMessage.newReference();

                for(int i = 0; i < _destinationQueues.size(); i++)
                {
                    BaseQueue queue = _destinationQueues.get(i);
View Full Code Here

Examples of org.apache.qpid.server.message.AMQMessage.newReference()

            try
            {
                final boolean immediate = _incommingMessage.isImmediate();

                final AMQMessage amqMessage = createAMQMessage(_incommingMessage);
                MessageReference ref = amqMessage.newReference();

                for(final BaseQueue queue : _destinationQueues)
                {
                    BaseQueue.PostEnqueueAction action;
View Full Code Here

Examples of org.apache.qpid.server.message.AMQMessage.newReference()

            try
            {
                final boolean immediate = _incommingMessage.isImmediate();

                final AMQMessage amqMessage = createAMQMessage(_incommingMessage);
                MessageReference ref = amqMessage.newReference();

                for(final BaseQueue queue : _destinationQueues)
                {
                    BaseQueue.PostEnqueueAction action;
View Full Code Here

Examples of org.apache.qpid.server.message.AMQMessage.newReference()

            try
            {
                final boolean immediate = _incommingMessage.isImmediate();

                final AMQMessage amqMessage = createAMQMessage(_incommingMessage);
                MessageReference ref = amqMessage.newReference();

                for(final BaseQueue queue : _destinationQueues)
                {
                    BaseQueue.PostEnqueueAction action;
View Full Code Here

Examples of org.apache.qpid.server.message.AMQMessage.newReference()

        AMQMessageHeader messageHeader = mock(AMQMessageHeader.class);
        when(messageHeader.getHeader(CONFLATION_KEY)).thenReturn(conflationKeyValue);
        when(mockMessage.getMessageHeader()).thenReturn(messageHeader);

        AMQMessageReference messageReference = new AMQMessageReference(mockMessage);
        when(mockMessage.newReference()).thenReturn(messageReference);

        return mockMessage;
    }

    private AMQQueue createTestQueue()
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.