util

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bech32DecodeBytes

func Bech32DecodeBytes(rawString string) (hrp string, decodedKey []byte, err error)

func Bech32EncodeBytes

func Bech32EncodeBytes(toEncode []byte, hrp string) (encodedBytes string, err error)

func CreateDoubleSha256

func CreateDoubleSha256(data []byte) []byte

func CreateSha256Hash

func CreateSha256Hash(data []byte) []byte

func GenerateRandomBytes

func GenerateRandomBytes(n int) ([]byte, error)

GenerateRandomBytes returns securely generated random bytes. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.

func PrngIsAvailable

func PrngIsAvailable() bool

func TlvRecordToBytes

func TlvRecordToBytes(record ...tlv.Record) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL