randtest

package
v0.0.0-...-0bbbf19 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int

func Int(t testing.TB, r io.Reader, max *big.Int) (n *big.Int)

Int returns a uniform random value in [0, max). It panics if max <= 0.

func Prime

func Prime(t testing.TB, r io.Reader, bits int) *big.Int

Prime returns a number of the given bit length that is prime with high probability. Prime will return error for any error returned by rand.Read or if bits < 2.

func Read

func Read(t testing.TB, b []byte) (n int)

Read is a helper function that calls Reader.Read using io.ReadFull. On return, n == len(b) if and only if err == nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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