iris_security_util

package module
v0.0.0-...-bf556ff Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 23 Imported by: 0

README

iris-security-util

golang iris framework helper -- security util

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessId

func AccessId(id string, key string) string

func AccessKey

func AccessKey() string

func AesDecrypt

func AesDecrypt(text string, key string) (string, bool)

func AesEncrypt

func AesEncrypt(text string, key string) (string, bool)

func Base64Decode

func Base64Decode(str string) string

func Base64Encode

func Base64Encode(str string) string

func CheckIPWhitelist

func CheckIPWhitelist(whitelist []string, addr string) bool

func CheckId

func CheckId(s string) bool

func GetBool

func GetBool(tree *toml.Tree, key string, values ...bool) bool

func GetString

func GetString(tree *toml.Tree, key string, values ...string) string

func HS256

func HS256(str string, key string) string

func HS384

func HS384(str string, key string) string

func HS512

func HS512(str string, key string) string

func Hash

func Hash(str string, config *toml.Tree, flag bool) string

func Id

func Id() string

func Integrity

func Integrity(value interface{}, config *toml.Tree) string

func Key

func Key(phrase string) string

func NormalizedId

func NormalizedId(id string) string

func ParseString

func ParseString(value interface{}, values ...string) string

func PrivatekeyEncodeString

func PrivatekeyEncodeString(key *rsa.PrivateKey) string

func PublicKeyEncodeString

func PublicKeyEncodeString(key *rsa.PublicKey) string

func RsaDecrypt

func RsaDecrypt(text string, key *rsa.PrivateKey) (string, bool)

func RsaEncrypt

func RsaEncrypt(text string, key *rsa.PublicKey) (string, bool)

func Sha256

func Sha256(str string) string

func Sha384

func Sha384(str string) string

func Sha512

func Sha512(str string) string

func Signature

func Signature(signature string, digest string, config *toml.Tree) string

func StringifyTime

func StringifyTime(t time.Time) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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