x11

package module
v0.0.0-...-e5ce9e6 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2018 License: ISC Imports: 12 Imported by: 3

README

go-x11-hash

Build Status ISC License GoDoc

Implements the X11 hash and required functions in Go

Usage

    package main

    import (
        "fmt"

        "gitlab.com/samli88/go-x11-hash"
    )

    func main() {
        hs, out := x11.New(), [32]byte{}
        hs.Hash([]byte("DASH"), out[:])
        fmt.Printf("%x \n", out[:])
    }

Notes

The echo, simd and shavite implementations do not have 100% test coverage. A full test on these requires the test to hash a blob of bytes that is several gigabytes large.

License

go-x11-hash is licensed under the copyfree ISC License.

Attribution/Credit

This work is based on an original work by Nitya Sattva originally found at https://gitlab.com/nitya-sattva/go-x11. Only a few tweaks have been made to rename some of the hash algorithms to align with those names used in Dash Core, and fix permissions.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

type Hash struct {
	// contains filtered or unexported fields
}

Hash contains the state objects required to perform the x11.Hash.

func New

func New() *Hash

New returns a new object to compute a x11 hash.

func (*Hash) Hash

func (ref *Hash) Hash(src []byte, dst []byte)

Hash computes the hash from the src bytes and stores the result in dst.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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