aboutsummaryrefslogtreecommitdiff
path: root/bhash.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-04-14 02:11:13 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-04-14 02:11:13 +0200
commitdffca582d57491e946582f2ac86e2c21ac5d6b74 (patch)
tree6d9a25e10e9aaba4f9ada0a2b95620b52e2ebba9 /bhash.go
parent004bf408ad7877f587b08e878a4c050ebf79cea9 (diff)
...
Diffstat (limited to 'bhash.go')
-rw-r--r--bhash.go40
1 files changed, 40 insertions, 0 deletions
diff --git a/bhash.go b/bhash.go
new file mode 100644
index 0000000..19c1ee8
--- /dev/null
+++ b/bhash.go
@@ -0,0 +1,40 @@
+package main
+
+import (
+ "hash"
+
+ "golang.org/x/crypto/blowfish"
+)
+
+var magic = []byte("OxychromaticBlowfishSwatDynamite")
+
+// blowfish hash
+type digest struct {
+ c *blowfish.Cipher
+}
+
+func (d *digest) Write(p []byte) (n int, err error) {
+ panic("not implemented")
+}
+
+func (d *digest) Sum(b []byte) []byte {
+ panic("not implemented")
+}
+
+func (d *digest) Reset() {
+ panic("not implemented")
+}
+
+func (d *digest) Size() int {
+ panic("not implemented")
+}
+
+func (d *digest) BlockSize() int {
+ return d.c.BlockSize()
+}
+
+func NewBHash() hash.Hash {
+ d := &digest{}
+ d.Reset()
+ return d
+}