Documentation ¶
Index ¶
- func FileMD5(filePath string) (string, error)
- func FileSHA1(filePath string) (string, error)
- func FileSHA256(filePath string) (string, error)
- func FileSHA512(filePath string) (string, error)
- func HashFile(filePath string, algorithm string) (string, error)
- func HashString(target string, algorithm string) (string, error)
- func StringMD5(target string) (string, error)
- func StringSHA1(target string) (string, error)
- func StringSHA256(target string) (string, error)
- func StringSHA512(target string) (string, error)
- func ValidateMD5(target string) bool
- func ValidateSHA1(target string) bool
- func ValidateSHA256(target string) bool
- func ValidateSHA512(target string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileSHA256 ¶
FileSHA256 returns the SHA256 hash of a file at the specified path.
func FileSHA512 ¶
FileSHA512 returns the SHA512 hash of a file at the specified path.
func HashFile ¶
HashFile returns the hex hash of a file at specified path with the specified hashing algorithm.
func HashString ¶
HashString returns the hex hash of the specified string.
func StringSHA1 ¶
StringSHA1 returns the SHA1 hash of the specified string.
func StringSHA256 ¶
StringSHA256 returns the SHA256 hash of the specified string.
func StringSHA512 ¶
StringSHA512 returns the SHA512 hash of the specified string.
func ValidateMD5 ¶
ValidateMD5 returns true if the specified string is a valid MD5 hash.
func ValidateSHA1 ¶
ValidateSHA1 returns true if the specified string is a valid SHA1 hash.
func ValidateSHA256 ¶
ValidateSHA256 returns true if the specified string is a valid SHA256 hash.
func ValidateSHA512 ¶
ValidateSHA512 returns true if the specified string is a valid SHA512 hash.
Types ¶
This section is empty.