hufu

package module
v0.0.0-...-70ccb5f Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: MIT Imports: 7 Imported by: 0

README

hufu

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(s *SplitTally, t Tally) error

Decode is the reverse of Encode that joins and decrypts the two separate pieces of data into the original object.

func ID

func ID() string

ID returns a unique ID

Types

type SplitTally

type SplitTally struct {
	Stock string
	Foil  string
}

SplitTally represents the split data to be stored separately.

func Encode

func Encode(t Tally) (*SplitTally, error)

Encode encrypts the object's json with a random key and splits its base64 encoding into two parts for keeping separately.

type Tally

type Tally interface{}

Tally represents the confidential data.

Jump to

Keyboard shortcuts

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