Documentation
¶
Overview ¶
Package keccak implements legacy Keccak secure hash functions.
For a detailed specification see: https://keccak.team.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Digest250 ¶
Digest250 returns the 256-bit Keccak hash of the data with the first 6 bits set to zero. Note that signature differs from standard Go hash functions in that the return type is a *big.Int meant to represent a field element, 𝔽ₚ. See the hash function section of the StarkNet documentation for details.
Example ¶
ExampleDigest showcases the use of the Digest250 function in the autogenerated documentation.
digest := Digest250([]byte("abc"))
fmt.Printf("0x%x\n", digest)
Output: 0x203657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45
func Digest256 ¶
Digest256 returns the 256-bit Keccak hash of the data.
Example ¶
ExampleDigest256 showcases the use of the Digest250 function in the autogenerated documentation.
digest := Digest256([]byte("abc"))
fmt.Printf("0x%x\n", digest)
Output: 0x4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45
Types ¶
This section is empty.