tiger

package
v0.0.0-...-39c852c Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2018 License: Apache-2.0, MIT Imports: 4 Imported by: 0

README

go-tiger

Implementation of the Tiger/192 hash algorithm

Documentation

Overview

Implements the Tiger/192 hash function as specified in http://www.cs.technion.ac.il/~biham/Reports/Tiger/tiger/tiger.html

Tiger/160 and Tiger/128 are simply truncations of the Tiger/192 sum, so there's no specific implementation for those.

Example (Tiger)
t := NewTiger()
t.Write([]byte("The quick brown fox jumps over the lazy dog"))
fmt.Println("Hash:", hex.EncodeToString(t.Sum(nil)))
Output:

Hash: 6d12a41e72e644f017b6f0e2f7b44c6285f06dd5d2c5b075
Example (Tiger2)
t := NewTiger2()
t.Write([]byte("The quick brown fox jumps over the lazy dog"))
fmt.Println("Hash:", hex.EncodeToString(t.Sum(nil)))
Output:

Hash: 976abff8062a2e9dcea3a1ace966ed9c19cb85558b4976d8

Index

Examples

Constants

View Source
const (
	BlockSize = 64 // 512 bits
	Size      = 24 // 192 bits
)

Variables

This section is empty.

Functions

func NewTiger

func NewTiger() hash.Hash

Returns a new hash.Hash that calculates the Tiger/192 hash digest.

func NewTiger2

func NewTiger2() hash.Hash

Returns a new hash.Hash that calculates the Tiger2/192 hash digest.

Tiger2 is exactly the same as Tiger but with a different padding scheme: while Tiger uses MD4's scheme of a 0x01 byte followed by zeros, Tiger2 uses MD5's scheme of a 0x80 byte followed by zeros.

Types

This section is empty.

Jump to

Keyboard shortcuts

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