secret

package
v0.0.0-...-1d13ee8 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package secret implement all crypto utils like password hashing and secret generation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken() (string, error)

GenerateToken generate hexadecimal token.

func Password

func Password(password string) (string, error)

Password hash a source string with argon2id, return properly encoded hash.

func VerifyPassword

func VerifyPassword(password string, hash string) (bool, error)

VerifyPassword check is source password and stored password is similar, take password and a properly encoded hash.

Types

This section is empty.

Jump to

Keyboard shortcuts

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