util

package
v0.0.0-...-395d67b Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const KeySize = 16

KeySize ya

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(text string, key []byte) (string, error)

Decrypt .

func Encrypt

func Encrypt(text string, key []byte) (string, error)

Encrypt .

func GetUserID

func GetUserID(c echo.Context) (int64, error)

GetUserID decrypts the user id from the user token stored in echo's context

func Obfuscate

func Obfuscate(id uint) int64

func RandomCIV

func RandomCIV() ([]byte, error)

RandomCIV generates a random common iv

Types

This section is empty.

Jump to

Keyboard shortcuts

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