-
Notifications
You must be signed in to change notification settings - Fork 0
/
tiger.go
39 lines (30 loc) · 837 Bytes
/
tiger.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package tiger
import (
"hash"
)
// New returns a new hash.Hash computing the Tiger hash value
func New() hash.Hash {
return newDigest(Size192, 1)
}
// New returns a new hash.Hash computing the Tiger2 hash value
func New2() hash.Hash {
return newDigest(Size192, 2)
}
// ===========
// New160 returns a new hash.Hash computing the Tiger160 checksum
func New160() hash.Hash {
return newDigest(Size160, 1)
}
// New2_160 returns a new hash.Hash computing the Tiger2_160 checksum
func New2_160() hash.Hash {
return newDigest(Size160, 2)
}
// ===========
// New128 returns a new hash.Hash computing the Tiger128 checksum
func New128() hash.Hash {
return newDigest(Size128, 1)
}
// New2_128 returns a new hash.Hash computing the Tiger2_128 checksum
func New2_128() hash.Hash {
return newDigest(Size128, 2)
}