package
1.1.0-alpha-8
Repository: https://github.com/glendc/0-stor.git
Documentation: pkg.go.dev

# README

Hash

  • hash the input data.
  • Supported hashing algorithm:
    • sha256
    • blake2 256
    • md5

Example

  • Hasher

        data := make([]byte, 4096)
        hasher, _ := NewHasher(Config{
            Type: TypeBlake2,
        })
        hasher.Hash(data)
    
  • block.Writer

        data := make([]byte, 4096)
        buf := block.NewBytesBuffer()
        w, _ := NewWriter(buf, Config{Type:TypeBlake2})
        w.WriteBlock(data)
    

# Functions

NewHasher creates new hasher.
NewWriter creates new hash writer.

# Constants

Hash Type.
Hash Type.
Hash Type.

# Structs

Config defines hasher configuration.
Hasher is object that produces hash according to it's type given during it's creation.
Writer defines hash writer.