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.

25 lines
573 B

  1. // Copyright 2016 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 !go1.7,amd64,!gccgo,!appengine
  5. package blake2b
  6. func init() {
  7. useSSE4 = supportsSSE4()
  8. }
  9. //go:noescape
  10. func supportsSSE4() bool
  11. //go:noescape
  12. func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
  13. func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
  14. if useSSE4 {
  15. hashBlocksSSE4(h, c, flag, blocks)
  16. } else {
  17. hashBlocksGeneric(h, c, flag, blocks)
  18. }
  19. }