randutil

package
v0.0.0-...-f0786df Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package randutil contains functions generate random sequences of runes or bytes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandBytes

func RandBytes(n int) []byte

RandBytes generates random []byte specified length, rand is pseudo-random number generators, for security-sensitive work, see the RandCryptBytes with crypto/rand package. nolint:gosec

func RandBytesHex

func RandBytesHex(n int) string

RandBytesHex generates random string specified length in hex format, rand is pseudo-random number generators, for security-sensitive work, see the RandCryptBytesHex with crypto/rand package.

func RandCryptBytes

func RandCryptBytes(n int) []byte

RandCryptBytes generates random []byte specified length, suitable for security-sensitive work. nolint:errcheck

func RandCryptBytesHex

func RandCryptBytesHex(n int) string

RandCryptBytesHex generates random string specified length in hex format, suitable for security-sensitive work.

func RandStringRunes

func RandStringRunes(n int) string

RandStringRunes generates random string specified length. nolint:gosec

Types

This section is empty.

Jump to

Keyboard shortcuts

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