Documentation ¶
Overview ¶
Package checksums provides various functions and types related to processing file checksums.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SHA256Checksum ¶
type SHA256Checksum string
SHA256Checksum is a 64 character string representing a SHA256 hash TODO: How to assign a `string` to `[64]string` ? Goal: Set SHA256Checksum as the return type for GenerateCheckSum(), but make sure that the length is locked in at the specific character length for our chosen file hash. type SHA256Checksum [64]string
func GenerateCheckSum ¶
func GenerateCheckSum(file string) (SHA256Checksum, error)
GenerateCheckSum returns a SHA256 hash as the checksum generated from a provided fully-qualified path to a file.
func (SHA256Checksum) String ¶
func (cs SHA256Checksum) String() string
func (SHA256Checksum) Verify ¶
func (cs SHA256Checksum) Verify(file string) error
Verify takes a path to a file, generates a SHA256 checksum from the file and compares against the checksum value already present