xaes

package
v0.0.0-...-26e1b9e Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesCBCDecrypt

func AesCBCDecrypt(encryptData, key []byte) ([]byte, error)

func AesCBCEncrypt

func AesCBCEncrypt(rawData, key []byte) ([]byte, error)

aes加密,填充秘钥256位的秘钥

func Decrypt

func Decrypt(ciphertext string) (string, error)

func Encrypt

func Encrypt(plaintext string) (string, error)

func PKCS7Padding

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

PKCS7Padding 使用PKCS7进行填充,IOS也是7

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

func SetAESSecret

func SetAESSecret(key string)

SetAESSecret 设置全局的对称秘钥,强度要求256位

Types

This section is empty.

Jump to

Keyboard shortcuts

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