aboutsummaryrefslogtreecommitdiff
path: root/bhash.go
blob: 19c1ee8b1e1365384588709bec339dbb1109e6db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
}