package
Version:
v1.1.0
Opens a new window with list of versions in this module.
Published: Nov 16, 2017
License: ISC
Opens a new window with license information.
Imports: 18
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package ahash provides support for hashing data with a selectable
hash function.
HashList returns a sorted list of all the hash algorithms supported by the
package.
func InsecureHashList() []string
InsecureHashList returns a sorted list of all the insecure hash algorithms
supported by the package.
func SecureHashList() []string
SecureHashList returns a sorted list of all the secure (cryptographic) hash
algorithms supported by the package.
Sum returns the digest (not the hex digest) of the data using the given
algorithm.
SumReader reads all the data from the given io.Reader and returns the
digest (not the hex digest) from the specified algorithm.
Hash represents a generic hash function that may or may not be secure. It
satisfies the hash.Hash interface.
New returns a new Hash for the specified algorithm.
HashAlgo returns the name of the underlying hash algorithm.
IsHash32 returns true if the underlying hash is a 32-bit hash function.
IsHash64 returns true if the underlying hash is a 64-bit hash function.
IsSecure returns true if the Hash is a cryptographic hash.
Sum32 returns true if the underlying hash is a 32-bit hash; if is, the
uint32 parameter will contain the hash.
Sum64 returns true if the underlying hash is a 64-bit hash; if is, the
uint64 parameter will contain the hash.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.