hash_asm.go 822 B

123456789101112131415161718192021222324
  1. // +build amd64,!appengine,!gccgo
  2. // Written in 2012 by Dmitry Chestnykh.
  3. //
  4. // To the extent possible under law, the author have dedicated all copyright
  5. // and related and neighboring rights to this software to the public domain
  6. // worldwide. This software is distributed without any warranty.
  7. // http://creativecommons.org/publicdomain/zero/1.0/
  8. // This file contains a function definition for use with assembly implementations of Hash()
  9. package siphash
  10. //go:noescape
  11. // Hash returns the 64-bit SipHash-2-4 of the given byte slice with two 64-bit
  12. // parts of 128-bit key: k0 and k1.
  13. func Hash(k0, k1 uint64, b []byte) uint64
  14. //go:noescape
  15. // Hash128 returns the 128-bit SipHash-2-4 of the given byte slice with two
  16. // 64-bit parts of 128-bit key: k0 and k1.
  17. func Hash128(k0, k1 uint64, b []byte) (uint64, uint64)