secret

package
v1.66.4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var APP struct {
	Asymmetric struct {
		RSA       asymmetric.RSA
		PEMBase64 asymmetric.PEMBase64
	}
	Symmetric struct {
		AES symmetric.AES
		CBC symmetric.CBC
		ECB symmetric.ECB
	}
}

Functions

func DecryptAuthorization

func DecryptAuthorization(token, secretKey string, iv []byte) (string, string, error)

func ECB16Decrypt added in v1.66.2

func ECB16Decrypt(data string, needEncrypt, needZip bool, aes *symmetric.AES) (any, error)

func ECB16Encrypt added in v1.66.2

func ECB16Encrypt(data any, needEncrypt, needZip bool, aes *symmetric.AES) (string, error)

func EncryptAuthorization

func EncryptAuthorization(key, secretKey string, iv []byte, randStr ...string) (string, string, error)

func MustEncrypt

func MustEncrypt(data any) (string, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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