encode

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 13 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)

AesDecrypt @brief:AES解密 AES秘钥的长度只能是16、24或32字节,分别对应三种AES,即AES-128, AES-192和AES-256,三者的区别是加密的轮数不同;

func AesEncrypt

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

AesEncrypt @brief:AES加密 AES秘钥的长度只能是16、24或32字节,分别对应三种AES,即AES-128, AES-192和AES-256,三者的区别是加密的轮数不同;

func Base64Decode

func Base64Decode(encodedData string) (result []byte, err error)

func Base64Encode

func Base64Encode(origData []byte) (result string)

func FlatCompress

func FlatCompress(origData []byte) (result []byte, err error)

func FlatUnCompress

func FlatUnCompress(compressData []byte) (result []byte, err error)

func MD5

func MD5(origData []byte) (result string)

func MD5File

func MD5File(fileName string) (result string, err error)

func PKCS5Padding

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

PKCS5Padding @brief:填充明文

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

PKCS5UnPadding @brief:去除填充数据

func Sha1

func Sha1(origData []byte) (result string)

func Sha1File

func Sha1File(fileName string) (result string, err error)

func Sha256

func Sha256(origData []byte) (result string)

func Sha256File

func Sha256File(fileName string) (result string, err error)

func Sha512

func Sha512(origData []byte) (result string)

func Sha512File

func Sha512File(fileName string) (result string, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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