auth

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64

func Base64(src string) string

func Bcrypt

func Bcrypt(src string) string

func CheckAcl

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

func CompareHash

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

func HmacSha1

func HmacSha1(src, key string) string

func HmacSha256

func HmacSha256(src, key string) string

func HmacSha512

func HmacSha512(src, key string) string

func Md5

func Md5(src string) string

func Sha1

func Sha1(src string) string

func Sha256

func Sha256(src string) string

func Sha512

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

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