[Pkg-privacy-commits] [golang-siphash-dev] 09/23: Don't export CRounds and DRounds.
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 12:55:53 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository golang-siphash-dev.
commit 75d0cba0dd995caa2b779c5d87a670870e411eda
Author: Dmitry Chestnykh <dmitry at codingrobots.com>
Date: Thu Jun 21 15:53:16 2012 +0200
Don't export CRounds and DRounds.
---
siphash.go | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/siphash.go b/siphash.go
index c395c85..60a2ec4 100644
--- a/siphash.go
+++ b/siphash.go
@@ -19,10 +19,12 @@ const (
BlockSize = 8
// The size of hash output in bytes.
Size = 8
+
+ // NOTE: Hash() doesn't use the following two constants.
// The number of c iterations.
- CRounds = 2
+ cRounds = 2
// The number of d iterations.
- DRounds = 4
+ dRounds = 4
)
type digest struct {
@@ -62,7 +64,7 @@ func block(d *digest, p []uint8) {
m := binary.LittleEndian.Uint64(p)
v3 ^= m
- for i := 0; i < CRounds; i++ {
+ for i := 0; i < cRounds; i++ {
v0 += v1
v1 = v1<<13 | v1>>(64-13)
v1 ^= v0
@@ -126,7 +128,7 @@ func (d0 *digest) Sum64() uint64 {
v0, v1, v2, v3 := d.v0, d.v1, d.v2, d.v3
v2 ^= 0xff
- for i := 0; i < DRounds; i++ {
+ for i := 0; i < dRounds; i++ {
v0 += v1
v1 = v1<<13 | v1>>(64-13)
v1 ^= v0
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/golang-siphash-dev.git
More information about the Pkg-privacy-commits
mailing list