utils

package
v1.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BLOCK_SIZE_16 = 16
)

Variables

This section is empty.

Functions

func AesEncrypt

func AesEncrypt(key, iv, data string) string

func EncryPasswd

func EncryPasswd(passwd string, pwdEncryptSalt string) (EncryptedPwd string)

func GetEncry

func GetEncry(resp *http.Response) (Lt string, pwdEncryptSalt string)

func PKCS7Padding

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

Types

type AesCipher128

type AesCipher128 struct {
	// contains filtered or unexported fields
}

func NewAesCipher128

func NewAesCipher128(key, iv []byte) *AesCipher128

func (*AesCipher128) BlockSize

func (aesCipher *AesCipher128) BlockSize() int

func (*AesCipher128) Decrypt

func (aesCipher *AesCipher128) Decrypt(encrData []byte) []byte

func (*AesCipher128) Encrypt

func (aesCipher *AesCipher128) Encrypt(origData []byte) []byte

Jump to

Keyboard shortcuts

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