generator

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSeed

func GenerateSeed() (optimus.Optimus, error)

GenerateSeed will generate a valid optimus object which can be used for encoding and decoding values.

NOTE: You must download and place the list of prime numbers into directory "data". See: github.com/pjebs/optimus-go-primes (493+MB).

If this repo is too large, then use RandN(50) to select a file from http://primes.utm.edu/lists/small/millions/ and then Rand(1000000) to choose a line to extract a prime.

func RandN

func RandN(N int64) uint64

RandN returns a cryptographically secure random number in the range [1,N].

Types

This section is empty.

Jump to

Keyboard shortcuts

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