Documentation
¶
Index ¶
- func GetRandomBytes(n int) ([]byte, error)
- func GetRandomBytesToBuffer(n int, buff []byte) error
- func GetRandomUInt32(max uint32) uint32
- func Keccak256(data ...[]byte) []byte
- func Keccak256Hash(data ...[]byte) (h types.Hash32)
- func NewUUID() [16]byte
- func Sha256(data ...[]byte) []byte
- func UUIDString() string
- type UUID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRandomBytes ¶
GetRandomBytes returns n random bytes. It returns an error if the system's pgn fails.
func GetRandomBytesToBuffer ¶
GetRandomBytesToBuffer puts n random bytes using go crypto.rand into provided buff slice. buff: a slice allocated by called to hold n bytes.
func GetRandomUInt32 ¶
GetRandomUInt32 returns a uint32 in the range [0 - max).
func Keccak256Hash ¶
Keccak256Hash calculates and returns the Keccak256 hash of the input data, converting it to an internal Hash data structure.
Types ¶
Click to show internal directories.
Click to hide internal directories.