Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Full Payload encryption/decryption

    ...

    Code Block
    
    from("direct:start").

...

  • 
        marshal().encryptXML().

...

  • 
        unmarshal().encryptXML().

...

  • 
    to("direct:end");
    
  • Partial Payload Content Only encryption/decryption
    Code Block

...

  • 
    String tagXPATH = "//cheesesites/italy/cheese";

...

  • 
    boolean secureTagContent = true;
    ...
    from("direct:start").

...

  • 
        marshal().encryptXML(tagXPATH , secureTagContent

...

  •  ).
        unmarshal().encryptXML(tagXPATH , secureTagContent).

...

  • 
    to("direct:end");
    
  • Partial Multi Node Payload Content Only encryption/decryption
    Code Block

...

  • 
    String tagXPATH = "//cheesesites/*/cheese";

...

  • 
    boolean secureTagContent = true;
    ....
    from("direct:start").

...

  • 
        marshal().encryptXML(tagXPATH , secureTagContent

...

  •  ).
        unmarshal().encryptXML(tagXPATH , secureTagContent).

...

  • 
    to("direct:end");
    
  • Partial Payload Content Only encryption/decryption with choice of passPhrase(password)

    ...

    Code Block
    
    String tagXPATH = "//cheesesites/italy/cheese";
    

...

  • boolean secureTagContent = true;
    

...

  • ....
    byte[] passPhrase = "Just another 24 Byte key".getBytes();
    

...

  • from("direct:start").
    

...

  •  

...

  •  

...

  •  

...

  •  

...

  • marshal().encryptXML(tagXPATH , secureTagContent , passPhrase).
    

...

  •  

...

  •  

...

  •  

...

  •  

...

  • unmarshal().encryptXML(tagXPATH , secureTagContent, passPhrase).
    

...

  • to("direct:end");

...

  • 
    
  • Partial Payload Content Only encryption/decryption with passPhrase(password) and Algorithm 

    ...

    Code Block
    
    import org.apache.xml.security.encryption.XMLCipher;
    

...

  • ....
    

...

  • String tagXPATH = "//cheesesites/italy/cheese";
    

...

  • boolean secureTagContent = true;
    

...

  • byte

...

  • [

...

  • ] passPhrase = "Just another 24 Byte key".getBytes();
    

...

  • String algorithm= XMLCipher.TRIPLEDES;
    

...

  • from("direct:start").
    

...

  •  

...

  •  

...

  •  

...

  •  

...

  • marshal().encryptXML(tagXPATH , secureTagContent , passPhrase, algorithm).
    

...

  •  

...

  •  

...

  •  

...

  •  

...

  • unmarshal().encryptXML(tagXPATH , secureTagContent, passPhrase, algorithm).
    

...

  • to("direct:end");

...

  • 
    

    Dependencies

This data format is provided in the *camel-xmlsecurity *component.