我在这里找到了一个库
https://github.com/juggler/ruby-rc4/blob/master/lib/rc4.rb
但它不适用于 ruby 1.9.x
它会抛出一个错误 undefined method ^' for "\x1A":String__
ruby 1.9.x 有什么解决方法吗?
谷歌搜索后,我知道“在 Ruby 1.9 中,字符串 [index] 返回字符而不是字符的代码(就像在 1.8 中一样)。” (https://rails.lighthouseapp.com/projects/8994/tickets/3144-undefined-method-for-string-ror-234)
提前致谢