xjcrypto

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESCbcDecrypt added in v0.8.0

func AESCbcDecrypt(secretKey, src string) string

func AESCbcEncrypt added in v0.8.0

func AESCbcEncrypt(secretKey, src string) string

func DesDecrypt added in v0.8.0

func DesDecrypt(str, k string) (destr string, err error)

func DesEncrypt added in v0.8.0

func DesEncrypt(str, k string) (enstr string, err error)

func Md5

func Md5(str string) string

func Nanoid added in v0.7.5

func Nanoid() string

func PKCS5Padding added in v0.8.0

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

func PKCS5UnPadding added in v0.8.0

func PKCS5UnPadding(origData []byte) []byte

func Padding added in v0.8.0

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

func UnPadding added in v0.8.0

func UnPadding(plainText []byte) []byte

func Uuid

func Uuid() string

Types

type AesEncrypter added in v0.8.0

type AesEncrypter struct {
	// contains filtered or unexported fields
}
var AesEcpt AesEncrypter

func (*AesEncrypter) AesBase64Decrypt added in v0.8.0

func (a *AesEncrypter) AesBase64Decrypt(b string) (string, error)

解密

func (*AesEncrypter) AesBase64Encrypt added in v0.8.0

func (a *AesEncrypter) AesBase64Encrypt(in string) (string, error)

加密

Jump to

Keyboard shortcuts

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