diff options
Diffstat (limited to 'pkg/btrfs/crc32c.go')
-rw-r--r-- | pkg/btrfs/crc32c.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/btrfs/crc32c.go b/pkg/btrfs/crc32c.go index 4ea4169..8266706 100644 --- a/pkg/btrfs/crc32c.go +++ b/pkg/btrfs/crc32c.go @@ -2,11 +2,16 @@ package btrfs import ( "encoding/binary" + "fmt" "hash/crc32" ) type CSum [0x20]byte +func (csum CSum) String() string { + return fmt.Sprintf("%x", csum) +} + func CRC32c(data []byte) CSum { crc := crc32.Update(0, crc32.MakeTable(crc32.Castagnoli), data) |