salsa20_noasm.go 566 B

123456789101112131415
  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 !amd64 || purego || !gc
  5. // +build !amd64 purego !gc
  6. package salsa
  7. // XORKeyStream crypts bytes from in to out using the given key and counters.
  8. // In and out must overlap entirely or not at all. Counter
  9. // contains the raw salsa20 counter bytes (both nonce and block counter).
  10. func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) {
  11. genericXORKeyStream(out, in, counter, key)
  12. }