whirlpool

package module
v0.0.0-...-0675e54 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: BSD-3-Clause Imports: 2 Imported by: 34

README

whirlpool.go

A whirlpool hashing library for go

Build status

Build Status

Setup

$ go get github.com/jzelinskie/whirlpool

Example

package main

import (
  "fmt"
  "github.com/jzelinskie/whirlpool"
)

func main() {
  w := whirlpool.New()
  text := []byte("This is an example.")
  w.Write(text)
  fmt.Println(w.Sum(nil))
}

Docs

Check out the gopkgdoc page, but there isn't much -- it works just like the other hashes in the standard library

Branches

  • master - stable, works like the hash libs in the corelib
  • trace - same code as master, but prints midstate values to stdout

license

Modified BSD License

Documentation

Overview

Package whirlpool implements the ISO/IEC 10118-3:2004 whirlpool cryptographic hash. Whirlpool is defined in http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() hash.Hash

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

Example
package main

import (
	"fmt"
	"io"

	"github.com/jzelinskie/whirlpool"
)

func main() {
	h := whirlpool.New()
	io.WriteString(h, "His money is twice tainted: 'taint yours and 'taint mine.")
	fmt.Printf("% x", h.Sum(nil))
}
Output:

63 6c e4 b3 3a 67 4a af 0b b4 e2 37 1d 85 b1 16 01 9d 57 08 dc 64 34 f6 db 9a 45 51 51 98 1f 2c 36 d7 c5 00 b0 40 af 09 ec 2d 5a 39 40 18 eb 65 6a e2 13 56 56 43 18 a0 fe 8f 0d 1c 1b 67 50 ec

Types

This section is empty.

Jump to

Keyboard shortcuts

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