md6

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

README

go-md6

md6 Hash with cgo

Env

CGO_ENABLED=1

Download
go get -u github.com/deatil/go-md6
Get Starting
import "github.com/deatil/go-md6"

func main() {
    data := []byte("...")

    h := md6.New256()
    h.Write(data)
    sum := h.Sum(nil)
}
New Functions

md6 have New functions: New(d int) (hash.Hash, error), New224() hash.Hash, New256() hash.Hash, New384() hash.Hash, New512() hash.Hash

Sum Functions

md6 have Sum functions: Sum(d int, data []byte) (out []byte, err error), Sum224(data []byte) (out [Size224]byte), Sum256(data []byte) (out [Size256]byte), Sum384(data []byte) (out [Size384]byte), Sum512(data []byte) (out [Size512]byte)

LICENSE
  • The library LICENSE is Apache2, using the library need keep the LICENSE.

Documentation

Index

Constants

View Source
const BlockSize = 64

The block size of the hash algorithm in bytes.

View Source
const Size224 = 28

The size list of a md6 hash value in bytes

View Source
const Size256 = 32
View Source
const Size384 = 48
View Source
const Size512 = 64

Variables

This section is empty.

Functions

func New

func New(d int) (hash.Hash, error)

New returns a new hash.Hash computing the md6 checksum.

func New224

func New224() hash.Hash

New224 returns a new hash.Hash computing the md6 checksum.

func New256

func New256() hash.Hash

New256 returns a new hash.Hash computing the md6 checksum.

func New384

func New384() hash.Hash

New384 returns a new hash.Hash computing the md6 checksum.

func New512

func New512() hash.Hash

New512 returns a new hash.Hash computing the md6 checksum.

func Sum added in v1.0.0

func Sum(d int, data []byte) (out []byte, err error)

Sum returns the md6 checksum.

func Sum224 added in v1.0.0

func Sum224(data []byte) (out [Size224]byte)

Sum224 returns the md6 checksum.

func Sum256 added in v1.0.0

func Sum256(data []byte) (out [Size256]byte)

Sum256 returns the md6 checksum.

func Sum384 added in v1.0.0

func Sum384(data []byte) (out [Size384]byte)

Sum384 returns the md6 checksum.

func Sum512 added in v1.0.0

func Sum512(data []byte) (out [Size512]byte)

Sum512 returns the md6 checksum.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL