cubehash.go
func cubehash256(data []byte) []byte {
	c := NewCubeHash()
	buf := make([]byte, 32)
	buf[0] = 0x80
	c.inputBlock(data)
	c.sixteenRounds()
	c.inputBlock(buf)
	c.sixteenRounds()
	c.xv ^= 1
	for j := 0; j < 10; j++ {
		c.sixteenRounds()
	}
	out := make([]byte, 32)
	binary.LittleEndian.PutUint32(out[0:], c.x0)
	binary.LittleEndian.PutUint32(out[4:], c.x1)
	binary.LittleEndian.PutUint32(out[8:], c.x2)
	binary.LittleEndian.PutUint32(out[12:], c.x3)
	binary.LittleEndian.PutUint32(out[16:], c.x4)
	binary.LittleEndian.PutUint32(out[20:], c.x5)
	binary.LittleEndian.PutUint32(out[24:], c.x6)
	binary.LittleEndian.PutUint32(out[28:], c.x7)
	return out
}
func cubehash256(data []byte) []byte {
	c := NewCubeHash()
	buf := make([]byte, 32)
	buf[0] = 0x80
	c.inputBlock(data)
	c.sixteenRounds()
	c.inputBlock(buf)
	c.sixteenRounds()
	c.xv ^= 1
	for j := 0; j < 10; j++ {
		c.sixteenRounds()
	}
	out := make([]byte, 32)
	binary.LittleEndian.PutUint32(out[0:], c.x0)
	binary.LittleEndian.PutUint32(out[4:], c.x1)
	binary.LittleEndian.PutUint32(out[8:], c.x2)
	binary.LittleEndian.PutUint32(out[12:], c.x3)
	binary.LittleEndian.PutUint32(out[16:], c.x4)
	binary.LittleEndian.PutUint32(out[20:], c.x5)
	binary.LittleEndian.PutUint32(out[24:], c.x6)
	binary.LittleEndian.PutUint32(out[28:], c.x7)
	return out
}
//cubehash56 calculates cubuhash256.
//length of data must be 32 bytes.