util

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearQrCode added in v1.3.1

func ClearQrCode()

ClearQrCode 清空二维码

func DesEncrypt

func DesEncrypt(key, plainText string) (string, error)

Encrypt encrypts the plaintext using DES algorithm with the given key

func GenerateCsrfValue added in v1.3.1

func GenerateCsrfValue(n string) string

GenerateCsrfValue 生成 Csrf-Value

func GenerateRandomString added in v1.3.1

func GenerateRandomString(n int) string

func PKCS7Padding

func PKCS7Padding(plainText []byte, blockSize int) []byte

PKCS7Padding pads the plaintext to be a multiple of the block size

func QrCodeDecode added in v1.3.1

func QrCodeDecode(pngBytes []byte) (string, error)

QrCodeDecode 解码二维码

func QrCodePrint added in v1.3.1

func QrCodePrint(content string) error

QrCodePrint 打印二维码

func RsaEncrypt

func RsaEncrypt(publicKey string, data string) (string, error)

func SendEmail added in v1.3.0

func SendEmail(host string, username string, password string, to string, subject string, body string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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