crypt

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLCGSource added in v1.2.0

func NewLCGSource(seed int64) rand.Source

Types

type Crypt

type Crypt interface {
	NewEncoder(w io.Writer, opts ...EncoderOption) io.Writer
	NewDecoder(r io.Reader, opts ...DecoderOption) io.Reader
}

Crypt wrap reader and writer

type DecoderOption added in v1.2.0

type DecoderOption func(opts DecoderOptions)

type DecoderOptions added in v1.2.0

type DecoderOptions interface {
}

type EncoderOption added in v1.2.0

type EncoderOption func(opts EncoderOptions)

type EncoderOptions added in v1.2.0

type EncoderOptions interface {
}

type LCGSource added in v1.2.0

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

LCGSource 结构体存储伪随机状态

func (*LCGSource) Int63 added in v1.2.0

func (l *LCGSource) Int63() int64

Int63 生成63位随机数

func (*LCGSource) Seed added in v1.2.0

func (l *LCGSource) Seed(seed int64)

Seed 实现rand.Source接口

func (*LCGSource) Uint64 added in v1.2.0

func (l *LCGSource) Uint64() uint64

Uint64 实现rand.Source64接口

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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