hashs

package
v0.0.0-...-e73f883 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bcrypt

func Bcrypt(password string, cost int) string

func BcryptCompare

func BcryptCompare(password, hash string) bool

func HMAC

func HMAC(bs, key []byte) []byte

func Md5Bytes

func Md5Bytes(bs []byte) string

func Md5Reader

func Md5Reader(r io.Reader) string

func Md5Str

func Md5Str(text string) string

func Sha1Bytes

func Sha1Bytes(bs []byte) string

func Sha1Reader

func Sha1Reader(r io.Reader) string

func Sha1Str

func Sha1Str(text string) string

func Sha2Bytes

func Sha2Bytes(bs []byte) string

func Sha2Reader

func Sha2Reader(r io.Reader) string

func Sha2Str

func Sha2Str(text string) string

Types

type HashID

type HashID struct {
	// contains filtered or unexported fields
}

func NewHashID

func NewHashID(salt string, minLength int) *HashID

func (*HashID) Decode

func (h *HashID) Decode(id string) (int64, error)

func (*HashID) Encode

func (h *HashID) Encode(id int64) string

Jump to

Keyboard shortcuts

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