Documentation
¶
Index ¶
Examples ¶
Constants ¶
View Source
const ( BLAKE = iota BMW JH KECCAK SKEIN LUFFA HAMSI SHABAL HASH_FUNC_COUNT )
View Source
const X8R16_LOOP_CNT = 16
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hash ¶
type Hash struct {
// contains filtered or unexported fields
}
Hash contains the state objects required to perform the x16.Hash.
func New ¶
func New() *Hash
New returns a new object to compute a x16 hash.
Example ¶
package main import ( "encoding/hex" "fmt" "github.com/Qitmeer/qitmeer/crypto/x8r16" ) func main() { b := []byte("helloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhel") h := x8r16.New() out := make([]byte, 32) h.Hash(b, out) fmt.Printf(hex.EncodeToString(out)) }
Output: 52ac0c51e33f308f838998528d492cb135162a90f235121a65033f143c214a16
Click to show internal directories.
Click to hide internal directories.