Ruby-RC4 icon indicating copy to clipboard operation
Ruby-RC4 copied to clipboard

FIX: support utf-8 string

Open snow opened this issue 9 years ago • 4 comments

snow avatar Jun 16 '16 07:06 snow

test fails, please wait for me fixing it.

snow avatar Jun 16 '16 07:06 snow

I'm not totally across the RC4 algorithm, but is this definitely what should be done?

If anything, I'd have guessed force_encoding('binary'). unpack('C*') might be the best way to ensure comparability with any input encoding.

yob avatar Jun 16 '16 07:06 yob

If anything, I'd have guessed force_encoding('binary'). unpack('C*') might be the best way to ensure comparability with any input encoding.

I'll try it when I'm free. Thank you for suggestion.

snow avatar Jun 16 '16 07:06 snow

Good luck!

yob avatar Jun 16 '16 08:06 yob