title: How can I convert a Blowfish encoded binary string to ASCII in Ruby?
body: <p>I would like to encode some plain text using Ruby and the <a href="http://crypt.rubyforge.org/blowfish.html" rel="nofollow noreferrer">Crypt library</a>. I would like to then transmit this encrypted text (along with some other data) as an ASCII hexadecimal string within an XML file. </p>
  
  <p>I have the following code snippet:</p>
  
  <pre><code>require 'rubygems'
  require 'crypt/blowfish'
  
  plain = "This is the plain text"
  puts plain
  
  blowfish = Crypt::Blowfish.new("A key up to 56 bytes long")
  enc = blowfish.encrypt_block(plain)
  puts enc
  </code></pre>
  
  <p>Which outputs:</p>
  
  <pre>This is the plain text
  ????;</pre>
  
  <p>I believe I need to call <code>enc.unpack()</code> but I'm not sure what parameters are required to the unpack method call.</p>