salsa20_noasm.go 538 B

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