README.markdown in secure_carrot-0.1.2 vs README.markdown in secure_carrot-0.2.0

- old
+ new

@@ -11,11 +11,11 @@ There is currently no way to prevent buffering using eventmachine. Support for prefetch is still unreliable. ## Example - require 'carrot' + require 'secure_carrot' q = Carrot.queue('name') 10.times do |num| q.publish(num.to_s) end @@ -26,9 +26,22 @@ while msg = q.pop(:ack => true) puts "Popping: #{msg}" q.ack end Carrot.stop + +## Encrypting and Decrypting messages + +Symmetric encryption is used here which means the same password is used for encrypting +and decrypting the message. + + puts "Encrypt and send a message" + q.send_message('Hello Carrot', :password => 'secure') + #=> "qrbSyJHx6JhBQtXKsWvm/A==\n" + + 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" # LICENSE Copyright (c) 2009 Amos Elliston, Geni.com; Published under The MIT License, see License