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 ¶
Returns a new hash.Hash that calculates the Tiger/192 hash digest.
func NewTiger2 ¶
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.
Click to show internal directories.
Click to hide internal directories.