1 // Copyright 2018 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
16 func xorKeyStreamVX(dst, src []byte, key *[8]uint32, nonce *[3]uint32, counter *uint32)
18 func (c *Cipher) xorKeyStreamAsm(dst, src []byte) {
20 if len(src) >= bufSize {
21 xorKeyStreamVX(dst, src, &c.key, &c.nonce, &c.counter)
24 if len(src)%bufSize != 0 {
25 i := len(src) - len(src)%bufSize
26 c.buf = [bufSize]byte{}
27 copy(c.buf[:], src[i:])
28 xorKeyStreamVX(c.buf[:], c.buf[:], &c.key, &c.nonce, &c.counter)
29 c.len = bufSize - copy(dst[i:], c.buf[:len(src)%bufSize])