1
0
Fork 0
forked from mirrors/tar-split

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"`
}