utils

package
v0.0.0-...-4abda61 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RAND_NUMBERS    = "0123456789"
	RAND_UPPER_CASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	RAND_LOWER_CASE = "abcdefghijklmnopqrstuvwxyz"

	SYSTEM_SALT              = "cWNZhnAiHeO8Y6UFW2HKor5WE6vbq8SC"
	PASSWORD_HASH_ITERATIONS = 1000
	SESSION_HASH_ITERATIONS  = 10
)

This file contains the hashing and random string genration functions, this should be analyzed for security.

Variables

This section is empty.

Functions

func GenerateRandomString

func GenerateRandomString(length int) (string, error)

Generates a random string of inputed length

func GenerateSessionID

func GenerateSessionID() (int64, error)

Generate a random number for session ID

func SessionHash

func SessionHash(userId uuid.UUID) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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