Documentation ¶
Index ¶
- func ToStrings(hashes []*externalapi.DomainHash) []string
- type HashWriter
- func Blake3HashWriter() HashWriter
- func BlakeHeavyHashWriter() HashWriter
- func NewBlockHashWriter() HashWriter
- func NewMerkleBranchHashWriter() HashWriter
- func NewTransactionHashWriter() HashWriter
- func NewTransactionIDWriter() HashWriter
- func NewTransactionSigningHashECDSAWriter() HashWriter
- func NewTransactionSigningHashWriter() HashWriter
- func PoWHashWriter() HashWriter
- func SHA3512PowHashWriter() HashWriter
- func SHA512PowHashWriter() HashWriter
- type ShakeHashWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToStrings ¶
func ToStrings(hashes []*externalapi.DomainHash) []string
ToStrings converts a slice of hashes into a slice of the corresponding strings
Types ¶
type HashWriter ¶
HashWriter is used to incrementally hash data without concatenating all of the data to a single buffer it exposes an io.Writer api and a Finalize function to get the resulting hash. The used hash function is blake3. This can only be created via one of the domain separated constructors
func Blake3HashWriter ¶
func Blake3HashWriter() HashWriter
BlakeHashWriter Returns a new HashWriter used for the HeavyHash function
func BlakeHeavyHashWriter ¶
func BlakeHeavyHashWriter() HashWriter
NewHeavyHashWriter Returns a new HashWriter used for the HeavyHash function
func NewBlockHashWriter ¶
func NewBlockHashWriter() HashWriter
NewBlockHashWriter Returns a new HashWriter used for hashing blocks
func NewMerkleBranchHashWriter ¶
func NewMerkleBranchHashWriter() HashWriter
NewMerkleBranchHashWriter Returns a new HashWriter used for a merkle tree branch
func NewTransactionHashWriter ¶
func NewTransactionHashWriter() HashWriter
NewTransactionHashWriter Returns a new HashWriter used for transaction hashes
func NewTransactionIDWriter ¶
func NewTransactionIDWriter() HashWriter
NewTransactionIDWriter Returns a new HashWriter used for transaction IDs
func NewTransactionSigningHashECDSAWriter ¶
func NewTransactionSigningHashECDSAWriter() HashWriter
NewTransactionSigningHashECDSAWriter Returns a new HashWriter used for signing on a transaction with ECDSA
func NewTransactionSigningHashWriter ¶
func NewTransactionSigningHashWriter() HashWriter
NewTransactionSigningHashWriter Returns a new HashWriter used for signing on a transaction
func PoWHashWriter ¶
func PoWHashWriter() HashWriter
NewPoWHashWriter Returns a new HashWriter used for the PoW function
func SHA3512PowHashWriter ¶
func SHA3512PowHashWriter() HashWriter
func SHA512PowHashWriter ¶
func SHA512PowHashWriter() HashWriter
func (HashWriter) Finalize ¶
func (h HashWriter) Finalize() *externalapi.DomainHash
Finalize returns the resulting hash
func (HashWriter) InfallibleWrite ¶
func (h HashWriter) InfallibleWrite(p []byte)
InfallibleWrite is just like write but doesn't return anything
type ShakeHashWriter ¶
ShakeHashWriter is exactly the same as HashWriter but for CShake256
func KeccakHeavyHashWriter ¶
func KeccakHeavyHashWriter() ShakeHashWriter
NewHeavyHashWriter Returns a new HashWriter used for the HeavyHash function
func (*ShakeHashWriter) Finalize ¶
func (h *ShakeHashWriter) Finalize() *externalapi.DomainHash
Finalize returns the resulting hash
func (*ShakeHashWriter) InfallibleWrite ¶
func (h *ShakeHashWriter) InfallibleWrite(p []byte)
InfallibleWrite is just like write but doesn't return anything