Commit 9394629b authored by Richard Musiol's avatar Richard Musiol Committed by Adam Langley

crypto/rc4: fix type errors in pure Go implementation

R=golang-dev, agl
CC=golang-dev
https://golang.org/cl/40540049
parent 107d1829
...@@ -12,9 +12,9 @@ func (c *Cipher) XORKeyStream(dst, src []byte) { ...@@ -12,9 +12,9 @@ func (c *Cipher) XORKeyStream(dst, src []byte) {
i, j := c.i, c.j i, j := c.i, c.j
for k, v := range src { for k, v := range src {
i += 1 i += 1
j += c.s[i] j += uint8(c.s[i])
c.s[i], c.s[j] = c.s[j], c.s[i] c.s[i], c.s[j] = c.s[j], c.s[i]
dst[k] = v ^ c.s[c.s[i]+c.s[j]] dst[k] = v ^ uint8(c.s[uint8(c.s[i]+c.s[j])])
} }
c.i, c.j = i, j c.i, c.j = i, j
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment