checksums

package
v0.5.5-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 7 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL