upsilon

package
v0.0.0-...-5201481 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2017 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Upsilon

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

Upsilon is an identifier that can be initialized with a custom length composed of a user specified time, hash, and random bits

func FromBase64

func FromBase64(timeSize, hashSize, randomSize int, ustring string) (*Upsilon, error)

FromBase64 creates a new Upsilon from a base64 encoded string

func FromBytes

func FromBytes(timeSize, hashSize, randomSize int, b []byte) (*Upsilon, error)

FromBytes creates a new Upsilon from an existing byte slice

func New

func New(timeSize, hashSize, randomSize int, input ...[]byte) (returnUpsilon *Upsilon, returnError error)

New creates a new Upsilon arg input is only required if arg hashSize is greater than zero

func (*Upsilon) Base64

func (u *Upsilon) Base64() string

Base64 returns the full raw bytes of an Upsilon encoded in standard padded base64

func (*Upsilon) Bytes

func (u *Upsilon) Bytes() []byte

Bytes returns the full raw bytes of an Upsilon

func (*Upsilon) Hash

func (u *Upsilon) Hash() []byte

Hash returns only the hash initialization bytes of an Upsilon

func (*Upsilon) HashBase64

func (u *Upsilon) HashBase64() string

HashBase64 returns only the hash initialization bytes of an Upsilon encoded in standard padded base64

func (*Upsilon) Rand

func (u *Upsilon) Rand() []byte

Rand returns only the random bytes of an Upsilon

func (*Upsilon) RandBase64

func (u *Upsilon) RandBase64() string

RandBase64 returns only the random bytes of an Upsilon encoded in standard padded base64

func (*Upsilon) Time

func (u *Upsilon) Time() []byte

Time returns only the time bytes of an Upsilon

func (*Upsilon) TimeBase64

func (u *Upsilon) TimeBase64() string

TimeBase64 returns only the time bytes of an Upsilon encoded in standard padded base64

Jump to

Keyboard shortcuts

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