Depcryption and base64

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,

-S

On 3 Dec 2007, at 17:11, Shandy N. wrote:

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs