diff --git a/cmd/bbolt/main.go b/cmd/bbolt/main.go index 809e36181..345dfedd0 100644 --- a/cmd/bbolt/main.go +++ b/cmd/bbolt/main.go @@ -2,6 +2,7 @@ package main import ( "bytes" + "crypto/sha256" "encoding/binary" "encoding/hex" "errors" @@ -535,7 +536,7 @@ func formatBytes(b []byte, format string) (string, error) { case "auto": return bytesToAsciiOrHex(b), nil case "redacted": - return fmt.Sprintf("", len(b)), nil + return fmt.Sprintf("", len(b), sha256.New().Sum(b)), nil default: return "", fmt.Errorf("formatBytes: unsupported format: %s", format) }