1
0
Fork 1
mirror of https://github.com/vbatts/tar-split.git synced 2024-12-18 11:36:30 +00:00

tar/storage: deciding on crc64 for integrity hash

This commit is contained in:
Vincent Batts 2015-03-03 14:25:09 -05:00
parent 4f1bde4d13
commit d55695834a

View file

@ -24,10 +24,15 @@ const (
// Entry is a the structure for packing and unpacking the information read from
// the Tar archive.
//
// FileType Payload checksum is using `hash/crc64` for basic file integrity,
// _not_ for cryptography.
// From http://www.backplane.com/matt/crc64.html, CRC32 has almost 40,000
// collisions in a sample of 18.2 million, CRC64 had none.
type Entry struct {
Type Type `json:"type"`
Name string `json:"name",omitempty`
Size int64 `json:"size",omitempty`
Payload []byte `json:"payload"` // SegmentType store payload here; FileType store checksum here;
Payload []byte `json:"payload"` // SegmentType store payload here; FileType store crc64 checksum here;
Position int `json:"position"`
}