本站源代码
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.

23 lines
718B

  1. // Copyright 2015 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 arm,!gccgo,!appengine,!nacl
  5. package poly1305
  6. // This function is implemented in sum_arm.s
  7. //go:noescape
  8. func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]byte)
  9. // Sum generates an authenticator for m using a one-time key and puts the
  10. // 16-byte result into out. Authenticating two different messages with the same
  11. // key allows an attacker to forge messages at will.
  12. func Sum(out *[16]byte, m []byte, key *[32]byte) {
  13. var mPtr *byte
  14. if len(m) > 0 {
  15. mPtr = &m[0]
  16. }
  17. poly1305_auth_armv6(out, mPtr, uint32(len(m)), key)
  18. }
上海开阖软件有限公司 沪ICP备12045867号-1