vprand

package
v0.0.0-...-bf055c7 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package vprand contains some random number generation helpers.

Index

Constants

View Source
const PackageCopyright = "Copyright (C)  2015, 2016  Christian Mauduit <ufoot@ufoot.org>" // PackageCopyright set by version.sh

PackageCopyright contains a short copyright notice.

View Source
const PackageEmail = "ufoot@ufoot.org" // PackageEmail set by version.sh

PackageEmail contains a contact email for the package.

View Source
const PackageLicense = "GNU GPL v3" // PackageLicense set by version.sh

PackageLicense contains a short license information.

View Source
const PackageName = "Vapor Toolkit" // PackageName set by version.sh

PackageName contains a readable name of the package, suitable for display.

View Source
const PackageTarname = "vapor" // PackageTarname set by version.sh

PackageTarname contains a short name of the package, suitable for a filename.

View Source
const PackageURL = "https://github.com/ufoot/vapor" // PackageURL set by version.sh

PackageURL contains the address of the project homepage.

View Source
const VersionMajor = 0 // VersionMajor set by version.sh

VersionMajor is the project major version.

View Source
const VersionMinor = 6 // VersionMinor set by version.sh

VersionMinor is the project minor version.

View Source
const VersionStamp = "c6a4298" // VersionStamp set by version.sh

VersionStamp is the project stamp, possibly changes for each build.

Variables

This section is empty.

Functions

func NewRand

func NewRand() *rand.Rand

NewRand returns a new random number generator. It is seeded with current time, to give it a little entropy.

func Rand128

func Rand128(r *rand.Rand, n *big.Int) *big.Int

Rand128 returns a random number on 128 bits. If n is nil, 0, or negative, or greater than 2^128, then everything is done as if n was 2^128.

func Rand256

func Rand256(r *rand.Rand, n *big.Int) *big.Int

Rand256 returns a random number on 256 bits. If n is nil, 0, or negative, or greater than 2^256, then everything is done as if n was 2^256.

func Rand32

func Rand32(r *rand.Rand, n uint32) uint32

Rand32 returns a random number on 64 bits. If n 0 then everything is done as if n was 2^32.

func Rand512

func Rand512(r *rand.Rand, n *big.Int) *big.Int

Rand512 returns a random number on 512 bits. If n is nil, 0, or negative, or greater than 2^512, then everything is done as if n was 2^512.

func Rand64

func Rand64(r *rand.Rand, n uint64) uint64

Rand64 returns a random number on 64 bits. If n 0 then everything is done as if n was 2^64.

Types

This section is empty.

Jump to

Keyboard shortcuts

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