chacha_ppc64le.go 468 B

123456789101112131415161718
  1. // Copyright 2019 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.
  4. //go:build gc && !purego
  5. // +build gc,!purego
  6. package chacha20
  7. const bufSize = 256
  8. //go:noescape
  9. func chaCha20_ctr32_vsx(out, inp *byte, len int, key *[8]uint32, counter *uint32)
  10. func (c *Cipher) xorKeyStreamBlocks(dst, src []byte) {
  11. chaCha20_ctr32_vsx(&dst[0], &src[0], len(src), &c.key, &c.counter)
  12. }