slicer

package
v1.6.29 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: BSD-2-Clause-Patent Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MAX_SLICES ...
	MAX_SLICES = 4 // The owner of the data + 3 trustees is optimal as of this version

	// MAX_DELTA is the maximum allowed deltaMax in the system as of this version
	MAX_DELTA = 5

	// MIN_INPUT_SIZE ...
	MIN_INPUT_SIZE = 8 // Input below 8 characters must be left-padded

	// MIN_SLICE_SIZE ...
	MIN_SLICE_SIZE = 2
)

Variables

This section is empty.

Functions

func GetDeltaMax

func GetDeltaMax(dataLength int, numberOfSlices int) int

GetDeltaMax ...

Types

type Seed

type Seed int64

Seed ...

func SeedFor

func SeedFor(data string) Seed

SeedFor ...

type Slice

type Slice string

Slice ...

type Slicer

type Slicer struct {
	NumberOfSlices int
	DeltaMax       int
}

Slicer ...

func (Slicer) Apply

func (s Slicer) Apply(data string) (slices []Slice, err error)

Apply returns the slices from the passed data

func (*Slicer) Split

func (s *Slicer) Split(data string) (splits []string, err error)

Split plits the passed data using a mask

func (Slicer) Unapply

func (s Slicer) Unapply(slices []Slice) (data string, err error)

Unapply rebuild the original data from the slices

Jump to

Keyboard shortcuts

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