encrypt

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESDecrypt

func AESDecrypt(encrypted []byte, key []byte) (decrypted []byte)

func AESEncrypt

func AESEncrypt(src []byte, key []byte) (encrypted []byte)

ECB

func AesDecrypt

func AesDecrypt(cryted []byte, key string) []byte

func AesEncrypt

func AesEncrypt(orig []byte, key string) []byte

CBC

func B64Bytes

func B64Bytes(b []byte) []byte

func B64Str

func B64Str(b []byte) *string

func EN

func EN(bts []byte) []byte

func ExampleNewCFBDecrypter

func ExampleNewCFBDecrypter()

CFB

func ExampleNewCFBEncrypter

func ExampleNewCFBEncrypter()

func PKCS7Padding

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

补码 AES加密数据块分组长度必须为128bit(byte[16]),密钥长度可以是128bit(byte[16])、192bit(byte[24])、256bit(byte[32])中的任意一个。

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

去码

func PaddingText1

func PaddingText1(str []byte, blockSize int) []byte

填充字符串(末尾)

func Sha1

func Sha1(b string) *string

func TN

func TN(bts *[]byte) []byte

func UnPaddingText1

func UnPaddingText1(str []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