package
1.2.17
Repository: https://github.com/hubmakerlabs/replicatr.git
Documentation: pkg.go.dev

# README

chainhash

ISC License

chainhash provides a generic hash type and associated functions that allows the specific hash algorithm to be abstracted.

Installation and Updating

$ go get -u mleku.online/git/ec/chainhash

License

Package chainhash is licensed under the copyfree ISC License.

# Functions

Decode decodes the byte-reversed hexadecimal string encoding of a Hash to a destination.
DoubleHashB calculates hash(hash(b)) and returns the resulting bytes.
DoubleHashH calculates hash(hash(b)) and returns the resulting bytes as a Hash.
HashB calculates hash(b) and returns the resulting bytes.
HashH calculates hash(b) and returns the resulting bytes as a Hash.
NewHash returns a new Hash from a byte slice.
NewHashFromStr creates a Hash from a hash string.
TaggedHash implements the tagged hash scheme described in BIP-340.

# Constants

HashSize of array used to store hashes.
MaxHashStringSize is the maximum length of a Hash hash string.

# Variables

ErrHashStrSize describes an error that indicates the caller specified a hash string that has too many characters.
TagBIP0340Aux is the BIP-0340 tag for aux data.
TagBIP0340Challenge is the BIP-0340 tag for challenges.
TagBIP0340Nonce is the BIP-0340 tag for nonces.
TagTapBranch is the message tag prefix used to compute the hash digest of two tap leaves into a taproot branch node.
TagTapLeaf is the message tag prefix used to compute the hash digest of a tapscript leaf.
TagTapSighash is the tag used by BIP 341 to generate the sighash flags.
TagTapTweak is the message tag prefix used to compute the hash tweak used to enable a public key to commit to the taproot branch root for the witness program.

# Type aliases

Hash is used in several of the bitcoin messages and common structures.