secu

package
v6.7.3 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(crypted, key []byte) ([]byte, error)

AES解密

func AesEncrypt

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

AES加密

func BASE64StdDecode

func BASE64StdDecode(src string) ([]byte, error)

BASE64StdDecode base64解码

func BASE64StdEncode

func BASE64StdEncode(src []byte) string

BASE64StdEncode base64编码

func DealWithDecrypt

func DealWithDecrypt(src string, key string) (string, error)

针对配置文件属性进行解密处理

func DealWithEncrypt

func DealWithEncrypt(src string, key string) (string, error)

针对配置文件属性进行加密处理

func Decrypt

func Decrypt(cipherText string, privateKeyByte []byte, password string) (decrypted string, err error)

func EncryptValue added in v6.3.0

func EncryptValue(value string, publicKeyData []byte) (string, error)

func GenerateRsaKeyPair added in v6.4.0

func GenerateRsaKeyPair(password string) (privateByte, publicByte []byte, err error)

func PKCS7Padding

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

func PKCS7UnPadding

func PKCS7UnPadding(originData []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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