encrypt

package
v0.0.0-...-768d9e2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeCryptBlocks

func DeCryptBlocks(dst, src []byte, block cipher.Block)

func EnCryptBlocks

func EnCryptBlocks(encryptData, src []byte, block cipher.Block)

func F处理密钥

func F处理密钥(keystr string) (genKey []byte)

func F处理密钥格式

func F处理密钥格式(key ...string) []byte

func F是否包含中文

func F是否包含中文(str string) bool

func PKCS7Padding

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

func PKCS7UnPadding

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

Types

type N新ase

type N新ase struct {
	ASE密钥   []byte
	V请求方法   string //支持CBC CFB ECB
	V加密结果方法 string //支持base64 hex
}

func (*N新ase) AesDecryptCBC

func (a *N新ase) AesDecryptCBC(encrypted []byte) (decrypted []byte, err error)

func (*N新ase) AesDecryptCFB

func (a *N新ase) AesDecryptCFB(encrypted []byte) (decrypted []byte, err error)

func (*N新ase) AesDecryptECB

func (a *N新ase) AesDecryptECB(encrypted []byte) (decrypted []byte, err error)

func (*N新ase) AesEncryptCBC

func (a *N新ase) AesEncryptCBC(origData []byte) (encrypted []byte, err error)

=================== CBC ======================

func (*N新ase) AesEncryptCFB

func (a *N新ase) AesEncryptCFB(origData []byte) (encrypted []byte, err error)

=================== CFB ======================

func (*N新ase) AesEncryptECB

func (a *N新ase) AesEncryptECB(origData []byte) (encrypted []byte, err error)

=================== ECB ======================

func (*N新ase) F加密信息

func (a *N新ase) F加密信息(body string) (string, error)

func (*N新ase) F解密信息

func (a *N新ase) F解密信息(body string) (string, error)

type S3Desc加解密

type S3Desc加解密 struct {
	V密钥       []byte
	V是否base64 bool
}

func F新建3Desc加解密

func F新建3Desc加解密(key ...string) *S3Desc加解密

func (*S3Desc加解密) F加密信息

func (a *S3Desc加解密) F加密信息(body string) (string, error)

func (*S3Desc加解密) F解密信息

func (a *S3Desc加解密) F解密信息(body string) (string, error)

type SASE加解密

type SASE加解密 struct {
	V密钥 []byte
}

func (*SASE加解密) F加密信息

func (a *SASE加解密) F加密信息(body string) (string, error)

func (*SASE加解密) F解密信息

func (a *SASE加解密) F解密信息(body string) (string, error)

type S加解密接口

type S加解密接口 interface {
	F加密信息(body string) (string, error)
	F解密信息(body string) (string, error)
}

func F新建Ase加解密

func F新建Ase加解密(key ...string) S加解密接口

func F新建Ase配置

func F新建Ase配置(args ...string) S加解密接口

Jump to

Keyboard shortcuts

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