utils

package
v0.0.0-...-e724b53 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparePassword

func ComparePassword(secret, pw, oldPw string) bool

CompareHash hashes a password and compares it to previously hashed password.

func FetchTitle

func FetchTitle(url string) (string, error)

FetchTitle finds the title of a page.

func GenerateSecret

func GenerateSecret(len int) (string, error)

GenerateSecret generates a secret for HMAC hashing.

func HashPassword

func HashPassword(secret, pw string) (string, error)

HashPassword creates a hash of secret and password.

func ReplaceEnvs

func ReplaceEnvs(txt string) string

ReplaceEnv replaces HOME and ~ in a string with contents of the $HOME environment variable.

Types

This section is empty.

Jump to

Keyboard shortcuts

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