crypter

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareHashAndPassword

func CompareHashAndPassword(hash, password string) bool

CompareHashAndPassword matches hash with password. Returns true if hash and password match.

func HashPassword

func HashPassword(password string) string

HashPassword hashes the password using bcrypt

func UID

func UID() string

UID returns unique string ID

Types

type Service

type Service struct{}

Service holds crypter methods

func New

func New() *Service

New initalizes crypter service

func (*Service) CompareHashAndPassword

func (*Service) CompareHashAndPassword(hash, password string) bool

CompareHashAndPassword matches hash with password. Returns true if hash and password match.

func (*Service) HashPassword

func (*Service) HashPassword(password string) string

HashPassword hashes the password using bcrypt

func (*Service) UID

func (*Service) UID() string

UID returns unique string ID

Jump to

Keyboard shortcuts

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