Documentation ¶
Index ¶
Constants ¶
View Source
const CHECKSUMLEN uint = 32
Variables ¶
This section is empty.
Functions ¶
func ChecksumToBytes ¶
Converts given checksum into []byte
Types ¶
type CheckSum ¶
type CheckSum [CHECKSUMLEN]byte
func BytesToChecksum ¶
Tries to convert given bytes into CheckSum type
func GetPartialCheckSum ¶
returns a checksum of given file. NOTE, that it creates checksum not of a full file (from all file bytes), but from separate byte blocks. This is done as an optimisation because the file can be very large in size. The general idea: BOF... CHUNK -> STEP -> CHUNK... EOF checksum := sha256.Sum256(ALLCHUNKS) GetPartialCheckSum is default method used to get a file checksum by sender and receiver
Click to show internal directories.
Click to hide internal directories.