encrypt

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesCbcDecrypt added in v1.26.0

func AesCbcDecrypt(ciphertext []byte, key []byte) ([]byte, error)

AesCbcDecrypt 执行AES的CBC模式解密操作

func Base64Decode

func Base64Decode(str string) string

func Base64Encode

func Base64Encode(str string) string

func Decrypt

func Decrypt(ciphertext, key []byte) ([]byte, error)

解密函数

func EncodeMD5

func EncodeMD5(value string) string

EncodeMD5 md5 encryption

func EncodeMD5AsEmpty

func EncodeMD5AsEmpty() string

EncodeMD5AsEmpty md5 encryption

func EncodeMD5Byte

func EncodeMD5Byte(value string) []byte

EncodeMD5Byte md5 encryption

func EncodeMD5Upper

func EncodeMD5Upper(value string) string

EncodeMD5Upper md5 encryption all upper

func Encrypt

func Encrypt(plaintext, key []byte) ([]byte, error)

加密函数

func GetMd5Sign

func GetMd5Sign(id, key, sign string, timeStamp int64) string

func PKCS7Padding

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

PKCS7填充

func PKCS7UnPadding

func PKCS7UnPadding(data []byte) ([]byte, error)

PKCS7UnPadding 实现PKCS#7的去填充操作

func Sha1Encode added in v1.25.0

func Sha1Encode(data string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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