utils

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomString added in v0.12.1

func GenerateRandomString(length int) string

GenerateRandomString generates a random string of a given length consisting of letters and digits.

func HashPassword

func HashPassword(password string) (string, error)

HashPassword generates a bcrypt hash for the given password. This function takes a password string as input, and returns the hashed password string and possible errors. The purpose of hashing the password is to securely store it, making it difficult for attackers to obtain the plaintext password.

Types

This section is empty.

Jump to

Keyboard shortcuts

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