utils

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64

func Base64(lngth int) string

func ByteArray

func ByteArray(lngth int) ([]byte, error)

func ContainsStr

func ContainsStr(arr []string, search string) (contains bool)

checks if array contains string

func GenerateKeys

func GenerateKeys()

This function generates an RS256 key pair Only if files are not existing

func GenerateToken

func GenerateToken() string

generates token

func GetBytes

func GetBytes(key interface{}) ([]byte, error)

---------------------------------

DEPRECATED

This function is no longer used ----------------------------------

func HashPassword

func HashPassword(pwd string) string

hashes with SHA512

func LogError

func LogError(err string, file string, line int)

loggs errors

func QueryToJson

func QueryToJson(db *sql.DB, query string, args ...interface{}) ([]byte, error)

queries every table to json

func RemoveValueFromArray

func RemoveValueFromArray(arr []string, val string) []string

func ValidateHash

func ValidateHash(pwd string, hash string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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