aboutsummaryrefslogtreecommitdiff
path: root/bhash.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-04-14 04:53:30 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-04-14 04:53:30 +0200
commit636d7e91d4ff729e1f17011c61ee0ce99fec197e (patch)
treecce94a6be044e269ffbc5e488685d72f9112bc9c /bhash.go
parentdffca582d57491e946582f2ac86e2c21ac5d6b74 (diff)
add bhash
Diffstat (limited to 'bhash.go')
-rw-r--r--bhash.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/bhash.go b/bhash.go
index 19c1ee8..04591a2 100644
--- a/bhash.go
+++ b/bhash.go
@@ -8,6 +8,8 @@ import (
var magic = []byte("OxychromaticBlowfishSwatDynamite")
+const rounds = 64 // fixed
+
// blowfish hash
type digest struct {
c *blowfish.Cipher
@@ -26,11 +28,11 @@ func (d *digest) Reset() {
}
func (d *digest) Size() int {
- panic("not implemented")
+ return blowfish.BlockSize * 4
}
func (d *digest) BlockSize() int {
- return d.c.BlockSize()
+ return blowfish.BlockSize
}
func NewBHash() hash.Hash {