mirror of
https://github.com/arnaucube/arbo.git
synced 2026-01-30 22:56:38 +01:00
Update public methods signatures
- Update public methods signatures - Remove 'lastAccess' param - Add option to pass root for tree.Dump, Iterate, IterateWithStop, Graphviz (and related) - Move error messages to const defined error messages for external usage
This commit is contained in:
6
hash.go
6
hash.go
@@ -37,8 +37,8 @@ type HashFunction interface {
|
||||
Type() []byte
|
||||
Len() int
|
||||
Hash(...[]byte) ([]byte, error)
|
||||
// CheckInputs checks if the inputs are valid without computing the hash
|
||||
// CheckInputs(...[]byte) error
|
||||
// CheckInput checks if the input is valid without computing the hash
|
||||
// CheckInput(...[]byte) error
|
||||
}
|
||||
|
||||
// HashSha256 implements the HashFunction interface for the Sha256 hash
|
||||
@@ -88,7 +88,7 @@ func (f HashPoseidon) Hash(b ...[]byte) ([]byte, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
hB := BigIntToBytes(h)
|
||||
hB := BigIntToBytes(f.Len(), h)
|
||||
return hB, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user