bmw.go
func bmw256(input []byte) []byte {
	b := new()
	buf := make([]byte, 64)
	copy(buf, input)
	buf[len(input)] = 0x80
	bitLen := uint64(len(input)) << 3
	binary.LittleEndian.PutUint64(buf[56:], bitLen)
	for i := 0; i < 16; i++ {
		b.m[i] = binary.LittleEndian.Uint32(buf[i*4:])
	}
	b.compress(b.m)
	b.h, b.h2 = b.h2, b.h
	copy(b.h, final)
	b.compress(b.h2)
	output := make([]byte, 32)
	outlen := len(output) >> 2
	for i := 0; i < outlen; i++ {
		j := 16 - outlen + i
		binary.LittleEndian.PutUint32(output[4*i:], b.h[j])
	}
	return output
}
func bmw256(input []byte) []byte {
	b := new()
	buf := make([]byte, 64)
	copy(buf, input)
	buf[len(input)] = 0x80
	bitLen := uint64(len(input)) << 3
	binary.LittleEndian.PutUint64(buf[56:], bitLen)
	for i := 0; i < 16; i++ {
		b.m[i] = binary.LittleEndian.Uint32(buf[i*4:])
	}
	b.compress(b.m)
	b.h, b.h2 = b.h2, b.h
	copy(b.h, final)
	b.compress(b.h2)
	output := make([]byte, 32)
	outlen := len(output) >> 2
	for i := 0; i < outlen; i++ {
		j := 16 - outlen + i
		binary.LittleEndian.PutUint32(output[4*i:], b.h[j])
	}
	return output
}
//bmw256 calculates and returns bmw256 of input.
//length of input must be 32 bytes.