command
Version:
v0.0.0-...-ee1bab5
Opens a new window with list of versions in this module.
Published: Apr 12, 2024
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Treap-based dynamic Merkle tree
Proof of concept for dynamic Merkle tree.
Treap as primary data structure used to achieve logarithmic inserting/removing.
Usage
package main
import (
"math/rand"
merkle "github.com/olegfomenko/crypto/dynamic-merkle"
)
func main() {
tree := merkle.New()
// Insert
tree.Insert([]byte("hash"), rand.Uint64())
// Merkle path
path := tree.MerklePath([]byte("hash"))
// Merkle Root
root := tree.MerkleRoot()
// Remove
tree.Remove([]byte("hash"))
}
Treap description: "https://en.wikipedia.org/wiki/Treap"
Merkle tree description: "https://en.wikipedia.org/wiki/Merkle_tree"
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.