Documentation ¶
Index ¶
- func AddNode(node verify.Node, tx *bolt.Tx) error
- func CalculateBlockHash(block []byte) (string, error)
- func CreateHeader(unsignedHash string, signedHash string, diskSize int, tableSize int) ([]byte, error)
- func CreateNode(blockStart int, blockEnd int, block []byte, prevNode *verify.Node, n string) (verify.Node, error)
- func ReadBlock(start int, end int, device *bytes.Reader) ([]byte, error)
- func SignDatabase(database string, minisignKeys string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNode ¶
AddNode adds a node to the bucket "Nodes" in the database. It assumes that a database transaction has already been started and takes bolt.Tx as an argument.
func CalculateBlockHash ¶
CalculateBlockHash calculates the sha1 checksum of a byte slice.
func CreateHeader ¶
func CreateHeader(unsignedHash string, signedHash string, diskSize int, tableSize int) ([]byte, error)
CreateHeader creates a header to be used in an fsverify partition containing all necessary information.
func CreateNode ¶
func CreateNode(blockStart int, blockEnd int, block []byte, prevNode *verify.Node, n string) (verify.Node, error)
CreateNode creates a Node based on given parameters. If prevNode is set to nil, meaning this node is the first node in a verification chain, prevNodeHash is set to "EntrypointN" with N being the number of entrypoint.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.