hashes

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 10 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileMD5

func FileMD5(filePath string) (string, error)

FileMD5 returns the MD5 hash of a file at the specified path.

func FileSHA1

func FileSHA1(filePath string) (string, error)

FileSHA1 returns the SHA1 hash of a file at the specified path.

func FileSHA256

func FileSHA256(filePath string) (string, error)

FileSHA256 returns the SHA256 hash of a file at the specified path.

func FileSHA512

func FileSHA512(filePath string) (string, error)

FileSHA512 returns the SHA512 hash of a file at the specified path.

func HashFile

func HashFile(filePath string, algorithm string) (string, error)

HashFile returns the hex hash of a file at specified path with the specified hashing algorithm.

func HashString

func HashString(target string, algorithm string) (string, error)

HashString returns the hex hash of the specified string.

func StringMD5

func StringMD5(target string) (string, error)

StringMD5 returns the MD5 hash of the specified string.

func StringSHA1

func StringSHA1(target string) (string, error)

StringSHA1 returns the SHA1 hash of the specified string.

func StringSHA256

func StringSHA256(target string) (string, error)

StringSHA256 returns the SHA256 hash of the specified string.

func StringSHA512

func StringSHA512(target string) (string, error)

StringSHA512 returns the SHA512 hash of the specified string.

func ValidateMD5

func ValidateMD5(target string) bool

ValidateMD5 returns true if the specified string is a valid MD5 hash.

func ValidateSHA1

func ValidateSHA1(target string) bool

ValidateSHA1 returns true if the specified string is a valid SHA1 hash.

func ValidateSHA256

func ValidateSHA256(target string) bool

ValidateSHA256 returns true if the specified string is a valid SHA256 hash.

func ValidateSHA512

func ValidateSHA512(target string) bool

ValidateSHA512 returns true if the specified string is a valid SHA512 hash.

Types

This section is empty.

Jump to

Keyboard shortcuts

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