register.go 364 B

123456789101112131415161718192021
  1. // Copyright 2017 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.9
  5. package blake2s
  6. import (
  7. "crypto"
  8. "hash"
  9. )
  10. func init() {
  11. newHash256 := func() hash.Hash {
  12. h, _ := New256(nil)
  13. return h
  14. }
  15. crypto.RegisterHash(crypto.BLAKE2s_256, newHash256)
  16. }