You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sum_noasm.go 565B

12345678910111213141516
  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.
  4. // +build s390x,!go1.11 !arm,!amd64,!s390x,!ppc64le gccgo appengine nacl
  5. package poly1305
  6. // Sum generates an authenticator for msg using a one-time key and puts the
  7. // 16-byte result into out. Authenticating two different messages with the same
  8. // key allows an attacker to forge messages at will.
  9. func Sum(out *[TagSize]byte, msg []byte, key *[32]byte) {
  10. h := newMAC(key)
  11. h.Write(msg)
  12. h.Sum(out)
  13. }