Fix up the encoding xor to work with both old and new ruby
git-svn-id: file:///home/svn/framework3/trunk@6617 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
51f0e8fc53
commit
2b4e0f440b
|
@ -120,7 +120,7 @@ class Generic
|
|||
pos = 0
|
||||
|
||||
while pos < buf.length
|
||||
encoded += (buf[pos,1].ord ^ key[pos % len, 1].ord).chr
|
||||
encoded += (buf[pos,1].unpack("C*")[0] ^ key[pos % len, 1].unpack("C*")[0]).chr
|
||||
key = _encode_mutate_key(buf, key, pos, len)
|
||||
pos += 1
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue