cryptoutil

package
v0.0.0-...-00e9e82 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package cryptoutil implements file checksum helpers

Index

Constants

View Source
const (
	CRC32  = "crc32"  // CRC32 keeps the name of crc32 algorithm
	MD5    = "md5"    // MD5 keeps the name of md5 algorithm
	SHA1   = "sha1"   // SHA1 keeps the name of sha1 algorithm
	SHA224 = "sha224" // SHA224 keeps the name of sha224 algorithm
	SHA256 = "sha256" // SHA256 keeps the name of sha256 algorithm
	SHA384 = "sha384" // SHA384 keeps the name of sha384 algorithm
	SHA512 = "sha512" // SHA512 keeps the name of sha512 algorithm
)

Variables

This section is empty.

Functions

func Checksum

func Checksum(file string, hashName string) (string, error)

Checksum calculates checksum for given file by given hash algorithm

func NewHash

func NewHash(name string) (hash.Hash, error)

NewHash returns hash algorithm implementation by name

Types

This section is empty.

Jump to

Keyboard shortcuts

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