From: Richard Musiol Date: Thu, 12 Dec 2013 19:32:31 +0000 (-0500) Subject: crypto/rc4: fix type errors in pure Go implementation X-Git-Tag: go1.3beta1~1253 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9394629b897b81284d1a02ecf840c1a991bd3b96;p=gostls13.git crypto/rc4: fix type errors in pure Go implementation R=golang-dev, agl CC=golang-dev https://golang.org/cl/40540049 --- diff --git a/src/pkg/crypto/rc4/rc4_ref.go b/src/pkg/crypto/rc4/rc4_ref.go index 44d3804368..bca4d28e1d 100644 --- a/src/pkg/crypto/rc4/rc4_ref.go +++ b/src/pkg/crypto/rc4/rc4_ref.go @@ -12,9 +12,9 @@ func (c *Cipher) XORKeyStream(dst, src []byte) { i, j := c.i, c.j for k, v := range src { i += 1 - j += c.s[i] + j += uint8(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 }