auth

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(hashedPassword, password string) error

Compare compares the encrypted text with the plain text if it's the same.

func CreateUUID

func CreateUUID() (string, error)

create a random UUID with from RFC 4122 adapted from http://github.com/nu7hatch/gouuid

func Encrypt

func Encrypt(source string) (string, error)

Encrypt encrytps ths plain text with bcrypt

func EncryptMd5

func EncryptMd5(source string) (cryptext string)

hash plaintext with md5

func EncryptSha1

func EncryptSha1(plaintext string) (cryptext string)

hash plaintext with SHA-1

Types

This section is empty.

Jump to

Keyboard shortcuts

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