diff options
| author | Nick Khyl <nickk@tailscale.com> | 2024-12-05 13:16:48 -0600 |
|---|---|---|
| committer | Nick Khyl <nickk@tailscale.com> | 2024-12-05 13:16:48 -0600 |
| commit | 0267fe83b200f1702a2fa0a395442c02a053fadb (patch) | |
| tree | 63654c55225eeb834de59a5a0bc8d19033c6145b /util/deephash/debug.go | |
| parent | 87546a5edf6b6503a87eeb2d666baba57398a066 (diff) | |
| download | tailscale-1.78.0.tar.xz tailscale-1.78.0.zip | |
VERSION.txt: this is v1.78.0v1.78.0
Signed-off-by: Nick Khyl <nickk@tailscale.com>
Diffstat (limited to 'util/deephash/debug.go')
| -rw-r--r-- | util/deephash/debug.go | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/util/deephash/debug.go b/util/deephash/debug.go index 50b3d5605..ff417e583 100644 --- a/util/deephash/debug.go +++ b/util/deephash/debug.go @@ -1,37 +1,37 @@ -// Copyright (c) Tailscale Inc & AUTHORS -// SPDX-License-Identifier: BSD-3-Clause - -//go:build deephash_debug - -package deephash - -import "fmt" - -func (h *hasher) HashBytes(b []byte) { - fmt.Printf("B(%q)+", b) - h.Block512.HashBytes(b) -} -func (h *hasher) HashString(s string) { - fmt.Printf("S(%q)+", s) - h.Block512.HashString(s) -} -func (h *hasher) HashUint8(n uint8) { - fmt.Printf("U8(%d)+", n) - h.Block512.HashUint8(n) -} -func (h *hasher) HashUint16(n uint16) { - fmt.Printf("U16(%d)+", n) - h.Block512.HashUint16(n) -} -func (h *hasher) HashUint32(n uint32) { - fmt.Printf("U32(%d)+", n) - h.Block512.HashUint32(n) -} -func (h *hasher) HashUint64(n uint64) { - fmt.Printf("U64(%d)+", n) - h.Block512.HashUint64(n) -} -func (h *hasher) Sum(b []byte) []byte { - fmt.Println("FIN") - return h.Block512.Sum(b) -} +// Copyright (c) Tailscale Inc & AUTHORS
+// SPDX-License-Identifier: BSD-3-Clause
+
+//go:build deephash_debug
+
+package deephash
+
+import "fmt"
+
+func (h *hasher) HashBytes(b []byte) {
+ fmt.Printf("B(%q)+", b)
+ h.Block512.HashBytes(b)
+}
+func (h *hasher) HashString(s string) {
+ fmt.Printf("S(%q)+", s)
+ h.Block512.HashString(s)
+}
+func (h *hasher) HashUint8(n uint8) {
+ fmt.Printf("U8(%d)+", n)
+ h.Block512.HashUint8(n)
+}
+func (h *hasher) HashUint16(n uint16) {
+ fmt.Printf("U16(%d)+", n)
+ h.Block512.HashUint16(n)
+}
+func (h *hasher) HashUint32(n uint32) {
+ fmt.Printf("U32(%d)+", n)
+ h.Block512.HashUint32(n)
+}
+func (h *hasher) HashUint64(n uint64) {
+ fmt.Printf("U64(%d)+", n)
+ h.Block512.HashUint64(n)
+}
+func (h *hasher) Sum(b []byte) []byte {
+ fmt.Println("FIN")
+ return h.Block512.Sum(b)
+}
|
