Documentation ¶
Index ¶
- Constants
- Variables
- func FNV32(text string) (uint32, error)
- func FNV32a(text string) (uint32, error)
- func FNV64(text string) (uint64, error)
- func FNV64a(text string) (uint64, error)
- func MD5(text string) ([]byte, error)
- func MD5Base64RawStdEnc(text string) (string, error)
- func MD5Base64RawURLEnc(text string) (string, error)
- func MD5Base64StdEnc(text string) (string, error)
- func MD5Base64URLEnc(text string) (string, error)
- func MD5Dir(path string) ([]byte, error)
- func MD5DirBase64RawStdEnc(path string) (string, error)
- func MD5DirBase64RawURLEnc(path string) (string, error)
- func MD5DirBase64StdEnc(path string) (string, error)
- func MD5DirBase64URLEnc(path string) (string, error)
- func MD5DirHex(path string) (string, error)
- func MD5File(path string) ([]byte, error)
- func MD5FileBase64RawStdEnc(path string) (string, error)
- func MD5FileBase64RawURLEnc(path string) (string, error)
- func MD5FileBase64StdEnc(path string) (string, error)
- func MD5FileBase64URLEnc(path string) (string, error)
- func MD5FileHex(path string) (string, error)
- func MD5Hex(text string) (string, error)
- func SHA1(text string) ([]byte, error)
- func SHA1Base64RawStdEnc(text string) (string, error)
- func SHA1Base64RawURLEnc(text string) (string, error)
- func SHA1Base64StdEnc(text string) (string, error)
- func SHA1Base64URLEnc(text string) (string, error)
- func SHA1File(path string) ([]byte, error)
- func SHA1FileBase64RawStdEnc(path string) (string, error)
- func SHA1FileBase64RawURLEnc(path string) (string, error)
- func SHA1FileBase64StdEnc(path string) (string, error)
- func SHA1FileBase64URLEnc(path string) (string, error)
- func SHA1FileHex(path string) (string, error)
- func SHA1Hex(text string) (string, error)
- func SHA224(text string) ([]byte, error)
- func SHA224Base64RawStdEnc(text string) (string, error)
- func SHA224Base64RawURLEnc(text string) (string, error)
- func SHA224Base64StdEnc(text string) (string, error)
- func SHA224Base64URLEnc(text string) (string, error)
- func SHA224File(path string) ([]byte, error)
- func SHA224FileBase64RawStdEnc(path string) (string, error)
- func SHA224FileBase64RawURLEnc(path string) (string, error)
- func SHA224FileBase64StdEnc(path string) (string, error)
- func SHA224FileBase64URLEnc(path string) (string, error)
- func SHA224FileHex(path string) (string, error)
- func SHA224Hex(text string) (string, error)
- func SHA256(text string) ([]byte, error)
- func SHA256Base64RawStdEnc(text string) (string, error)
- func SHA256Base64RawURLEnc(text string) (string, error)
- func SHA256Base64StdEnc(text string) (string, error)
- func SHA256Base64URLEnc(text string) (string, error)
- func SHA256File(path string) ([]byte, error)
- func SHA256FileBase64RawStdEnc(path string) (string, error)
- func SHA256FileBase64RawURLEnc(path string) (string, error)
- func SHA256FileBase64StdEnc(path string) (string, error)
- func SHA256FileBase64URLEnc(path string) (string, error)
- func SHA256FileHex(path string) (string, error)
- func SHA256Hex(text string) (string, error)
- func SHA384(text string) ([]byte, error)
- func SHA384Base64RawStdEnc(text string) (string, error)
- func SHA384Base64RawURLEnc(text string) (string, error)
- func SHA384Base64StdEnc(text string) (string, error)
- func SHA384Base64URLEnc(text string) (string, error)
- func SHA384File(path string) ([]byte, error)
- func SHA384FileBase64RawStdEnc(path string) (string, error)
- func SHA384FileBase64RawURLEnc(path string) (string, error)
- func SHA384FileBase64StdEnc(path string) (string, error)
- func SHA384FileBase64URLEnc(path string) (string, error)
- func SHA384FileHex(path string) (string, error)
- func SHA384Hex(text string) (string, error)
- func SHA512(text string) ([]byte, error)
- func SHA512Base64RawStdEnc(text string) (string, error)
- func SHA512Base64RawURLEnc(text string) (string, error)
- func SHA512Base64StdEnc(text string) (string, error)
- func SHA512Base64URLEnc(text string) (string, error)
- func SHA512File(path string) ([]byte, error)
- func SHA512FileBase64RawStdEnc(path string) (string, error)
- func SHA512FileBase64RawURLEnc(path string) (string, error)
- func SHA512FileBase64StdEnc(path string) (string, error)
- func SHA512FileBase64URLEnc(path string) (string, error)
- func SHA512FileHex(path string) (string, error)
- func SHA512Hex(text string) (string, error)
- type Algorithm
- type Encoding
- type ExtHash
- type ExtHashBuilder
Constants ¶
View Source
const ( MD5Hash Algorithm = "md5" FNV32Hash = "fnv32" FNV32aHash = "fnv32a" FNV64Hash = "fnv64" FNV64aHash = "fnv64a" SHA1Hash = "sha1" SHA256Hash = "sha256" SHA224Hash = "sha224" SHA512Hash = "sha512" SHA384Hash = "sha384" )
Variables ¶
View Source
var ErrUnsupportedAlgorithm = errors.New("hashutils: unsupported hashing algorithm")
Functions ¶
func MD5Base64RawStdEnc ¶
func MD5Base64RawURLEnc ¶
func MD5Base64StdEnc ¶
func MD5Base64URLEnc ¶
func MD5DirBase64RawStdEnc ¶
func MD5DirBase64RawURLEnc ¶
func MD5DirBase64StdEnc ¶
func MD5DirBase64URLEnc ¶
func MD5FileBase64RawStdEnc ¶
func MD5FileBase64RawURLEnc ¶
func MD5FileBase64StdEnc ¶
func MD5FileBase64URLEnc ¶
func MD5FileHex ¶
func SHA1Base64RawStdEnc ¶
func SHA1Base64RawURLEnc ¶
func SHA1Base64StdEnc ¶
func SHA1Base64URLEnc ¶
func SHA1FileBase64RawStdEnc ¶
func SHA1FileBase64RawURLEnc ¶
func SHA1FileBase64StdEnc ¶
func SHA1FileBase64URLEnc ¶
func SHA1FileHex ¶
func SHA224Base64RawStdEnc ¶
func SHA224Base64RawURLEnc ¶
func SHA224Base64StdEnc ¶
func SHA224Base64URLEnc ¶
func SHA224File ¶
func SHA224FileBase64StdEnc ¶
func SHA224FileBase64URLEnc ¶
func SHA224FileHex ¶
func SHA256Base64RawStdEnc ¶
func SHA256Base64RawURLEnc ¶
func SHA256Base64StdEnc ¶
func SHA256Base64URLEnc ¶
func SHA256File ¶
func SHA256FileBase64StdEnc ¶
func SHA256FileBase64URLEnc ¶
func SHA256FileHex ¶
func SHA384Base64RawStdEnc ¶
func SHA384Base64RawURLEnc ¶
func SHA384Base64StdEnc ¶
func SHA384Base64URLEnc ¶
func SHA384File ¶
func SHA384FileBase64StdEnc ¶
func SHA384FileBase64URLEnc ¶
func SHA384FileHex ¶
func SHA512Base64RawStdEnc ¶
func SHA512Base64RawURLEnc ¶
func SHA512Base64StdEnc ¶
func SHA512Base64URLEnc ¶
func SHA512File ¶
func SHA512FileBase64StdEnc ¶
func SHA512FileBase64URLEnc ¶
func SHA512FileHex ¶
Types ¶
type Algorithm ¶
type Algorithm string
Algorithm represents the type of hashing algorithms supported by this package.
type Encoding ¶
type Encoding string
An Encoding is a radix 64 encoding/decoding scheme, defined by a 64-character alphabet.
const ( Hex Encoding = "hex" Base64 = "base64" )
type ExtHashBuilder ¶
type ExtHashBuilder interface { Algorithm(Algorithm) ExtHashBuilder Encoding(Encoding) ExtHashBuilder Build() ExtHash }
func New ¶
func New() ExtHashBuilder
Click to show internal directories.
Click to hide internal directories.