That means it''s expecting ''stream'' access, while
you''re passing it a
string -- I ran into the same problem, researched it, and finally gave
up.
Now I use Pelle Braendgaard''s EzCrypto module:
gem install ezcrypto
HTH...jon
On Apr 2, 5:03 pm, "JSeidel"
<jsei...-SqBBwp4wwK4AvxtiuMwx3w@public.gmane.org>
wrote:> I need toencrypt/decrypt some data in my application. I downloaded
> crypt-1.1.4.zip and installed it successfully. But when I run a simple
> test program, I get the following error:
>
> <code>
> C:/Dev/InstantRails/ruby/lib/ruby/site_ruby/1.8/crypt/cbc.rb:31:in
> `encrypt_stream'': undefined method `write'' for
"":String
> (NoMethodError)
> from testcrypt.rb:8
> </code>
>
> Program is very simple:
>
> <code>
> require ''crypt/blowfish''
> tkey = ''12345''
> tblow = Crypt::Blowfish.new(tkey)
> testblock = ''abcdeft12345''
> testcrypt = ''''
> tblow.encrypt_stream(testblock,testcrypt)
> tblow.decrypt_stream(testcrypt,testdecrypt)
> puts testblock, testdecrypt
> </code>
>
> Crypt::Blowfihs mixes in Crypt::CBC which requires
''stringio'', which
> is where I''m guessing the write method should be.
>
> Any pointers as to what I''m doing wrong here?
>
> Thanks much...jon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---