generator

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2015 License: MIT Imports: 9 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenRandomPassword

func GenRandomPassword() (string, error)

gen random base64 encoded password

func GenRandomToken

func GenRandomToken() ([]byte, error)

gen random token bytes

Types

type KeyGenerator

type KeyGenerator struct {
	AESKey string
}

func NewKeyGenerator

func NewKeyGenerator(key string) (*KeyGenerator, error)

func (*KeyGenerator) DecodeIdFromRandomKey

func (g *KeyGenerator) DecodeIdFromRandomKey(encrypted string) (int64, error)

get id from encrypt strings

func (*KeyGenerator) GenRandomKey

func (g *KeyGenerator) GenRandomKey(id int64) (string, error)

Jump to

Keyboard shortcuts

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