decrypter

package
v1.6.12 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: BSD-2-Clause-Patent Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PARTIAL_PREFIX ...
	PARTIAL_PREFIX = "%"
)

Variables

This section is empty.

Functions

func Parse

func Parse(unparsed string) (index int, dec string, err error)

Parse ...

Types

type Collector

type Collector struct {
	Map              map[int]Uncrumb
	NumberOfSlices   int
	VerificationHash string
	HashEngine       string
}

Collector ...

func (*Collector) Check

func (c *Collector) Check(data []byte) bool

Check verifies the passed data against the verification hash

func (*Collector) ToObfuscated

func (c *Collector) ToObfuscated() (obfuscated []byte, err error)

ToObfuscated returns the concatenated slices into the obfuscated string

type Uncrumb

type Uncrumb struct {
	Deciphered core.Base64
	Index      int
}

Uncrumb holds the deciphered slice and its index.

func Decrypt

func Decrypt(encrypted encrypter.Crumb, s signer.Signer) (data Uncrumb, err error)

Decrypt decrypts the passed encrypted Crumb and returns it as an Uncrumb

func ToUncrumb

func ToUncrumb(unparsed string) (u Uncrumb, err error)

ToUncrumb ...

func (*Uncrumb) String

func (u *Uncrumb) String() string

String transforms the Uncrumb into its stringified representation. The construct is as follows: - the uncrumb's partial prefix; - the following two characters are the hexadecimal representation of the index, ie. utils.IntToHex(Index); - the base64-encoded deciphered slice.

func (*Uncrumb) ToSlice

func (u *Uncrumb) ToSlice() slicer.Slice

ToSlice ...

Jump to

Keyboard shortcuts

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