On 3 Dec 2007, at 17:11, Shandy Nantz wrote:
>
> Just wondering is anyone can explain this code to me:
>
> Base64.encode64(@key.send("#{key_type}_encrypt", text))
>
> I have this code the encrypts some information. This part seems to
> work
> fine. I using some software on the back end that I have written in
> VB to
> decrypt it and it seems to have issues. So I just wanted to make sure
> that the code i have written in Ruby does what I think it does, and
> that
> is that it encrypts the data and then encodes it to base 64? But
I''m
> not
> sure if it does this for both the data and the keys? Thanks,
Well it calls the method #{key_type}_encrypt on @key, with the
parameter text.
It then base64 encodes the result of that.
Fred
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---