camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm O hEigeartaigh <cohei...@apache.org>
Subject Re: XML DSL for Encrpt decrypt data
Date Fri, 27 Sep 2013 14:51:47 GMT
"keyRef" is a reference to a java.security.Key Object in the Camel
Registry. To see how it works, take a look at one of the tests:

https://github.com/apache/camel/blob/master/components/camel-crypto/src/test/resources/org/apache/camel/component/crypto/SpringCryptoDataFormatTest.xml

<crypto id="initvector" algorithm="DES/CBC/PKCS5Padding" keyRef="desKey"
initVectorRef="initializationVector" />

<bean id="desKey"
class="org.apache.camel.converter.crypto.SpringCryptoDataFormatTest"
factory-method="getDesKey" />

The latter method is available here:

https://github.com/apache/camel/blob/master/components/camel-crypto/src/test/java/org/apache/camel/converter/crypto/SpringCryptoDataFormatTest.java

Colm.


On Fri, Sep 27, 2013 at 8:05 AM, apdwivedi1208 <apdwivedi1208@gmail.com>wrote:

> I am new to camel and was trying to encrypt/decrypt data using camel XML
> DSL.
>
> <dataFormats>
>         <crypto id="initvector" algorithm="DES" keyRef="desKey"  />
> </dataFormats>
>
> but it was unable to understand desKey So i have tried couple of thing to
> define desKey as a bean using "SecretKeySpec" and "KeyGenerator" class but
> noting is working. I am also not able to find any working example on it.
> Please help to get an example on XML dsl for data encryption.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/XML-DSL-for-Encrpt-decrypt-data-tp5740281.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message