[Pkg-privacy-commits] [golang-siphash-dev] 11/23: Add README, add CC Zero to all files.
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 9deeb8bce226bb2428c54a0255c9fd1ebadf52be
Author: Dmitry Chestnykh <dmitry at codingrobots.com>
Date: Thu Jun 21 16:10:04 2012 +0200
Add README, add CC Zero to all files.
---
README | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
hash.go | 7 +++++++
siphash_test.go | 7 +++++++
3 files changed, 65 insertions(+)
diff --git a/README b/README
new file mode 100644
index 0000000..9123c6a
--- /dev/null
+++ b/README
@@ -0,0 +1,51 @@
+Go implementation of SipHash-2-4, a fast short-input PRF created by
+Jean-Philippe Aumasson and Daniel J. Bernstein (http://131002.net/siphash/).
+
+INSTALLATION
+
+ $ go get github.com/dchest/siphash
+
+
+USAGE
+
+ import "github.com/dchest/siphash"
+
+ There are two ways to use this package.
+ The slower one is to use the standard hash.Hash64 interface:
+
+ h := siphash.New(key)
+ h.Write([]byte("Hello")
+ sum := h.Sum(nil) // returns 8-bit []byte
+
+ or
+
+ sum64 := h.Sum64() // returns uint64
+
+ The faster one is to use Hash() function, which takes two uint64 parts of
+ 16-byte key and a byte slice, and returns uint64 hash:
+
+ sum64 := siphash.Hash(key0, key1, []byte("Hello"))
+
+ The keys and output are little-endian.
+
+
+FUNCTIONS
+
+func Hash(k0, k1 uint64, p []byte) uint64
+
+ Hash returns the 64-bit SipHash-2-4 of the given byte slice with two
+ 64-bit parts of 128-bit key: k0 and k1.
+
+func New(key []byte) hash.Hash64
+
+ New returns a new hash.Hash64 computing SipHash-2-4 with 16-byte key.
+
+
+PUBLIC DOMAIN DEDICATION
+
+Written in 2012 by Dmitry Chestnykh.
+
+To the extent possible under law, the author have dedicated all copyright
+and related and neighboring rights to this software to the public domain
+worldwide. This software is distributed without any warranty.
+http://creativecommons.org/publicdomain/zero/1.0/
diff --git a/hash.go b/hash.go
index e7e12ee..be9d3cf 100644
--- a/hash.go
+++ b/hash.go
@@ -1,3 +1,10 @@
+// Written in 2012 by Dmitry Chestnykh.
+//
+// To the extent possible under law, the author have dedicated all copyright
+// and related and neighboring rights to this software to the public domain
+// worldwide. This software is distributed without any warranty.
+// http://creativecommons.org/publicdomain/zero/1.0/
+
package siphash
// Hash returns the 64-bit SipHash-2-4 of the given byte slice with two 64-bit
diff --git a/siphash_test.go b/siphash_test.go
index e7f5a10..a6511ba 100644
--- a/siphash_test.go
+++ b/siphash_test.go
@@ -1,3 +1,10 @@
+// Written in 2012 by Dmitry Chestnykh.
+//
+// To the extent possible under law, the author have dedicated all copyright
+// and related and neighboring rights to this software to the public domain
+// worldwide. This software is distributed without any warranty.
+// http://creativecommons.org/publicdomain/zero/1.0/
+
package siphash
import (
--
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