random

package
v0.0.0-...-348a65b Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	N          = 312
	M          = 156
	MATRIX_A   = 0xB5026F5AA96619E9
	UPPER_MASK = 0xFFFFFFFF80000000
	LOWER_MASK = 0x7FFFFFFF
)

Variables

This section is empty.

Functions

func GetRandomByte

func GetRandomByte(len int) []byte

func GetRandomByteHexStr

func GetRandomByteHexStr(len int) string

func GetTimeRand

func GetTimeRand() *rand.Rand

func NewRand

func NewRand() *rand.Rand

func NewRand64

func NewRand64() *rand.Rand

func NewSource

func NewSource() rand.Source

func NewSource64

func NewSource64() rand.Source64

Types

type Ec2b

type Ec2b struct {
	// contains filtered or unexported fields
}

func LoadEc2bKey

func LoadEc2bKey(b []byte) (*Ec2b, error)

func NewEc2b

func NewEc2b() *Ec2b

func (*Ec2b) Bytes

func (e *Ec2b) Bytes() []byte

func (*Ec2b) Key

func (e *Ec2b) Key() []byte

func (*Ec2b) Seed

func (e *Ec2b) Seed() uint64

func (*Ec2b) SetSeed

func (e *Ec2b) SetSeed(seed uint64)

func (*Ec2b) XorKey

func (e *Ec2b) XorKey() []byte

type KeyBlock

type KeyBlock struct {
	// contains filtered or unexported fields
}

func NewKeyBlock

func NewKeyBlock(seed uint64, useMagicSeed bool) *KeyBlock

func (*KeyBlock) Seed

func (b *KeyBlock) Seed() uint64

func (*KeyBlock) XorKey

func (b *KeyBlock) XorKey() [4096]byte

Jump to

Keyboard shortcuts

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