Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Edited Readme

  • Loading branch information...
commit 301f202745f8344891653075c4b152f6c5a6b6bd 1 parent 221fa91
@sriram authored
View
4 README.markdown
@@ -27,7 +27,7 @@ There is currently no way to prevent buffering using eventmachine. Support for p
puts "Popping: #{msg}"
q.ack
end
- Carrot.stop
+
## Encrypting and Decrypting messages
@@ -41,6 +41,8 @@ and decrypting the message.
puts "Receiving and decrypting message. If you don't specify the password you will read an encrypted message."
q.receive_message(:password => 'secure')
#=> "Hello Carrot"
+
+ Carrot.stop
# LICENSE
View
BIN  pkg/secure_carrot-0.1.2.gem
Binary file not shown
View
BIN  pkg/secure_carrot-0.2.0.gem
Binary file not shown
View
2  rdoc/classes/Carrot/AMQP/Queue.html
@@ -519,7 +519,7 @@ <h3 class="section-bar">Public Instance methods</h3>
114: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">receive_message</span>(<span class="ruby-identifier">opts</span>={})
115: <span class="ruby-identifier">msg</span> = <span class="ruby-identifier">pop</span>(<span class="ruby-identifier">opts</span>)
116: <span class="ruby-identifier">password</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:password</span>]
-117: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">password</span>
+117: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">msg</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">password</span>
118: <span class="ruby-identifier">decrypted_message</span> = <span class="ruby-identifier">decrypt_message</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">password</span>)
119: <span class="ruby-identifier">decrypted_message</span>
120: <span class="ruby-keyword kw">end</span>
View
2  rdoc/created.rid
@@ -1 +1 @@
-Thu, 09 Sep 2010 10:35:46 +0530
+Thu, 09 Sep 2010 11:45:04 +0530
View
20 rdoc/files/README_markdown.html
@@ -56,7 +56,7 @@
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
- <td>Wed Sep 08 11:01:54 +0530 2010</td>
+ <td>Thu Sep 09 11:43:45 +0530 2010</td>
</tr>
</table>
</div>
@@ -99,7 +99,7 @@
## Example
</p>
<pre>
- require 'carrot'
+ require 'secure_carrot'
q = Carrot.queue('name')
10.times do |num|
@@ -116,6 +116,22 @@
Carrot.stop
</pre>
<p>
+## Encrypting and Decrypting messages
+</p>
+<p>
+Symmetric encryption is used here which means the same password is used for
+encrypting and decrypting the message.
+</p>
+<pre>
+ puts &quot;Encrypt and send a message&quot;
+ q.send_message('Hello Carrot', :password =&gt; 'secure')
+ #=&gt; &quot;qrbSyJHx6JhBQtXKsWvm/A==\n&quot;
+
+ puts &quot;Receiving and decrypting message. If you don't specify the password you will read an encrypted message.&quot;
+ q.receive_message(:password =&gt; 'secure')
+ #=&gt; &quot;Hello Carrot&quot;
+</pre>
+<p>
# LICENSE
</p>
<p>
View
2  rdoc/files/lib/amqp/queue_rb.html
@@ -56,7 +56,7 @@
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
- <td>Thu Sep 09 10:34:38 +0530 2010</td>
+ <td>Thu Sep 09 10:40:09 +0530 2010</td>
</tr>
</table>
</div>
View
2  secure_carrot.gemspec
@@ -5,7 +5,7 @@
Gem::Specification.new do |s|
s.name = %q{secure_carrot}
- s.version = "0.1.2"
+ s.version = "0.2.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Sriram Varahan"]
Please sign in to comment.
Something went wrong with that request. Please try again.