auth

package
v2.5.4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64 added in v2.4.0

func Base64(src string) string

func Bcrypt added in v2.4.0

func Bcrypt(src string) string

func CheckAcl

func CheckAcl(tam map[string]auth.Access, write bool) bool

func CompareHash added in v2.4.0

func CompareHash(hashed, plain, key string, ht HashType) bool

func HmacSha1 added in v2.4.0

func HmacSha1(src, key string) string

func HmacSha256 added in v2.4.0

func HmacSha256(src, key string) string

func HmacSha512 added in v2.4.0

func HmacSha512(src, key string) string

func Md5 added in v2.4.0

func Md5(src string) string

func Sha1 added in v2.4.0

func Sha1(src string) string

func Sha256 added in v2.4.0

func Sha256(src string) string

func Sha512 added in v2.4.0

func Sha512(src string) string

Types

type Blacklist

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

func (*Blacklist) CheckBLAcl

func (b *Blacklist) CheckBLAcl(cl *mqtt.Client, topic string, write bool) (n int, ok bool)

func (*Blacklist) CheckBLAuth

func (b *Blacklist) CheckBLAuth(cl *mqtt.Client, pk packets.Packet) (n int, ok bool)

func (*Blacklist) SetBlacklist

func (b *Blacklist) SetBlacklist(bl *auth.Ledger)

type HashType added in v2.4.0

type HashType int
const (
	HashNone HashType = iota
	HashBcrypt
	HashMd5
	HashSha1
	HashSha256
	HashSha512
	HashHmacSha1
	HashHmacSha256
	HashHmacSha512
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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