crypt

package
v0.0.0-...-91c7ab2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDeCrypt

func AesDeCrypt(cypted []byte, key []byte) ([]byte, error)

AesDeCrypt 实现解密

func AesEcrypt

func AesEcrypt(origData []byte, key []byte) ([]byte, error)

AesEcrypt 实现加密

func DePwdCode

func DePwdCode(key, pwd string) ([]byte, error)

DePwdCode 解密

func EnPwdCode

func EnPwdCode(key string, pwd []byte) (string, error)

EnPwdCode 加密base64 //key 16,24,32位字符串的话,分别对应AES-128,AES-192,AES-256 加密方法

func PKCS7Padding

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

PKCS7Padding PKCS7 填充模式

func PKCS7UnPadding

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

PKCS7UnPadding 填充的反向操作,删除填充字符串

Types

This section is empty.

Jump to

Keyboard shortcuts

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