Author: buildbot
Date: Wed Jan 30 22:24:06 2013
New Revision: 848679

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/book-dataformat-appendix.html
    websites/production/camel/content/crypto.html

Modified: websites/production/camel/content/book-dataformat-appendix.html
==============================================================================
--- websites/production/camel/content/book-dataformat-appendix.html (original)
+++ websites/production/camel/content/book-dataformat-appendix.html Wed Jan 30 
22:24:06 2013
@@ -3345,7 +3345,7 @@ from(<span class="code-quote">"direct:ke
 
 <h3><a shape="rect" 
name="BookDataFormatAppendix-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
@@ -3365,7 +3365,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/crypto.html
==============================================================================
--- websites/production/camel/content/crypto.html (original)
+++ websites/production/camel/content/crypto.html Wed Jan 30 22:24:06 2013
@@ -306,7 +306,7 @@ from(<span class="code-quote">"direct:ke
 
 <h3><a shape="rect" name="Crypto-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
@@ -326,7 +326,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>


Reply via email to