diff options
| author | Rutger Broekhoff | 2023-12-29 21:31:53 +0100 |
|---|---|---|
| committer | Rutger Broekhoff | 2023-12-29 21:31:53 +0100 |
| commit | 404aeae4545d2426c089a5f8d5e82dae56f5212b (patch) | |
| tree | 2d84e00af272b39fc04f3795ae06bc48970e57b5 /vendor/golang.org/x/crypto/blake2b/register.go | |
| parent | 209d8b0187ed025dec9ac149ebcced3462877bff (diff) | |
| download | gitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.tar.gz gitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.zip | |
Make Nix builds work
Diffstat (limited to 'vendor/golang.org/x/crypto/blake2b/register.go')
| -rw-r--r-- | vendor/golang.org/x/crypto/blake2b/register.go | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/vendor/golang.org/x/crypto/blake2b/register.go b/vendor/golang.org/x/crypto/blake2b/register.go new file mode 100644 index 0000000..d9fcac3 --- /dev/null +++ b/vendor/golang.org/x/crypto/blake2b/register.go | |||
| @@ -0,0 +1,32 @@ | |||
| 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 | |||
| 5 | //go:build go1.9 | ||
| 6 | |||
| 7 | package blake2b | ||
| 8 | |||
| 9 | import ( | ||
| 10 | "crypto" | ||
| 11 | "hash" | ||
| 12 | ) | ||
| 13 | |||
| 14 | func init() { | ||
| 15 | newHash256 := func() hash.Hash { | ||
| 16 | h, _ := New256(nil) | ||
| 17 | return h | ||
| 18 | } | ||
| 19 | newHash384 := func() hash.Hash { | ||
| 20 | h, _ := New384(nil) | ||
| 21 | return h | ||
| 22 | } | ||
| 23 | |||
| 24 | newHash512 := func() hash.Hash { | ||
| 25 | h, _ := New512(nil) | ||
| 26 | return h | ||
| 27 | } | ||
| 28 | |||
| 29 | crypto.RegisterHash(crypto.BLAKE2b_256, newHash256) | ||
| 30 | crypto.RegisterHash(crypto.BLAKE2b_384, newHash384) | ||
| 31 | crypto.RegisterHash(crypto.BLAKE2b_512, newHash512) | ||
| 32 | } | ||