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)