camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r848685 - in /websites/production/camel/content: book-in-one-page.html cache/main.pageCache
Date Wed, 30 Jan 2013 23:23:07 GMT
Author: buildbot
Date: Wed Jan 30 23:23:07 2013
New Revision: 848685

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/book-in-one-page.html
    websites/production/camel/content/cache/main.pageCache

Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Wed Jan 30 23:23:07 2013
@@ -14165,7 +14165,7 @@ from(<span class="code-quote">"direct:ke
 
 <h3><a shape="rect" name="BookInOnePage-EncryptingwithPGPDataFormat"></a>Encrypting
with PGPDataFormat</h3>
 
-<p>The following sample uses the popular PGP format for encrypting/decypting files
using the libraries from <a shape="rect" class="external-link" href="http://www.bouncycastle.org/java.html"
rel="nofollow">http://www.bouncycastle.org/java.html</a>.  For help managing your
keyring see the next section</p>
+<p>The following sample uses the popular PGP format for encrypting/decrypting files
using the <a shape="rect" class="external-link" href="http://www.bouncycastle.org/java.html"
rel="nofollow">Bouncy Castle Java libraries</a>:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-comment">// Public Key FileName
@@ -14185,7 +14185,33 @@ from(<span class="code-quote">"direct:in
 </pre>
 </div></div>
 
-<p>or using spring</p>
+<p>The following sample performs signing + encryption, and then signature verification
+ decryption. It uses the same keyring for both signing and encryption, but you can obviously
use different keys:</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">PGPDataFormat pgpSignAndEncrypt = <span class="code-keyword">new</span>
PGPDataFormat();
+pgpSignAndEncrypt.setKeyFileName(keyFileName);
+pgpSignAndEncrypt.setKeyUserid(keyUserid);
+pgpSignAndEncrypt.setSignatureKeyFileName(keyFileNameSec);
+pgpSignAndEncrypt.setSignatureKeyUserid(keyUserid);
+pgpSignAndEncrypt.setSignaturePassword(keyPassword);
+
+PGPDataFormat pgpVerifyAndDecrypt = <span class="code-keyword">new</span> PGPDataFormat();
+pgpVerifyAndDecrypt.setKeyFileName(keyFileNameSec);
+pgpVerifyAndDecrypt.setKeyUserid(keyUserid);
+pgpVerifyAndDecrypt.setPassword(keyPassword);
+pgpVerifyAndDecrypt.setSignatureKeyFileName(keyFileName);
+pgpVerifyAndDecrypt.setSignatureKeyUserid(keyUserid);
+
+from(<span class="code-quote">"direct:inline-sign"</span>)
+        .marshal(pgpSignAndEncrypt)
+        .to(<span class="code-quote">"mock:encrypted"</span>)
+        .unmarshal(pgpVerifyAndDecrypt)
+        .to(<span class="code-quote">"mock:unencrypted"</span>);
+</pre>
+</div></div>
+
+<p>Or using Spring:</p>
+
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-xml"><span class="code-tag">&lt;dataFormats&gt;</span>
   <span class="code-tag"><span class="code-comment">&lt;!-- will load the
file from classpath by default, but you can prefix with file: to load from file system --&gt;</span></span>

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.



Mime
View raw message