base

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultNumParts = 2

DefaultNumParts is the default number of splits of a secret.

Variables

This section is empty.

Functions

This section is empty.

Types

type Splitter

type Splitter struct{}

Splitter is an implementation to split a secret into multiple parts and the ability to reconstruct it.

func (*Splitter) Combine

func (b *Splitter) Combine(secretParts [][]byte) ([]byte, error)

Combine the split secretParts into a combined secret. It does not validate if secretParts where split from the same original secret. ie the caller of Split() must validate that the returned value of Combine matches the original secret.

func (*Splitter) Split

func (b *Splitter) Split(secret []byte, numParts, threshold int) ([][]byte, error)

Split a secret into numParts (minimum 2) of secret parts and sets a minimum threshold to reconstruct it.

Jump to

Keyboard shortcuts

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