File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ type digest struct {
2222 h2 uint64
2323}
2424
25- func Uint64 (b []byte ) uint64 {
25+ func uint64byte (b []byte ) uint64 {
2626 return uint64 (b [0 ]) | uint64 (b [1 ])<< 8 | uint64 (b [2 ])<< 16 | uint64 (b [3 ])<< 24 |
2727 uint64 (b [4 ])<< 32 | uint64 (b [5 ])<< 40 | uint64 (b [6 ])<< 48 | uint64 (b [7 ])<< 56
2828}
@@ -32,8 +32,8 @@ func (d *digest) bmix(p []byte) (tail []byte) {
3232 nblocks := len (p ) / 16
3333 for i := 0 ; i < nblocks ; i ++ {
3434 j := 16 * i
35- k1 := Uint64 (p [j : j + 8 ])
36- k2 := Uint64 (p [j + 8 : j + 16 ])
35+ k1 := uint64byte (p [j : j + 8 ])
36+ k2 := uint64byte (p [j + 8 : j + 16 ])
3737 k1 *= c1
3838 k1 = (k1 << 31 ) | (k1 >> 33 )
3939 k1 *= c2
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ type digestString struct {
1717 h2 uint64
1818}
1919
20- func Uint64String (b string ) uint64 {
20+ func uint64String (b string ) uint64 {
2121 return uint64 (b [0 ]) | uint64 (b [1 ])<< 8 | uint64 (b [2 ])<< 16 | uint64 (b [3 ])<< 24 |
2222 uint64 (b [4 ])<< 32 | uint64 (b [5 ])<< 40 | uint64 (b [6 ])<< 48 | uint64 (b [7 ])<< 56
2323}
@@ -27,8 +27,8 @@ func (d *digestString) bmixString(p string) (tail string) {
2727 nblocks := len (p ) / 16
2828 for i := 0 ; i < nblocks ; i ++ {
2929 j := 16 * i
30- k1 := Uint64String (p [j : j + 8 ])
31- k2 := Uint64String (p [j + 8 : j + 16 ])
30+ k1 := uint64String (p [j : j + 8 ])
31+ k2 := uint64String (p [j + 8 : j + 16 ])
3232 k1 *= c1
3333 k1 = (k1 << 31 ) | (k1 >> 33 )
3434 k1 *= c2
You can’t perform that action at this time.
0 commit comments