From 269c74fe4a9450b84e8d7e06279da59a7fef990d Mon Sep 17 00:00:00 2001 From: Russ Magee Date: Tue, 24 Sep 2019 21:25:37 -0700 Subject: [PATCH] renamed yield8() to yield() --- cryptmt.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cryptmt.go b/cryptmt.go index 6b3960f..9174a3a 100644 --- a/cryptmt.go +++ b/cryptmt.go @@ -20,7 +20,7 @@ type Cipher struct { m *mtwist.MT19937_64 } -func (c *Cipher) yield8() (r byte) { +func (c *Cipher) yield() (r byte) { c.accum = c.accum * (c.m.Int63() | 1) r = byte(c.accum>>56) & 0xFF return @@ -34,7 +34,7 @@ func NewCipher(key []byte) (c *Cipher) { c.accum = 1 // from paper, discard first 64 bytes of output for idx := 0; idx < 64; idx++ { - _ = c.yield8() + _ = c.yield() } return c } @@ -55,6 +55,6 @@ func (c *Cipher) XORKeyStream(dst, src []byte) { } for i, b := range src { - dst[i] = b ^ c.yield8() + dst[i] = b ^ c.yield() } }