crypto

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PublicKeyStr ...
	PublicKeyStr = `` /* 182-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func AESDecryptCBC

func AESDecryptCBC(encrypted, key, iv []byte) (decrypted []byte)

AESDecryptCBC ...

func AESDecryptECB

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

AESDecryptECB ...

func GetAESDecryptKey

func GetAESDecryptKey(cr, sr, plainText string) string

GetAESDecryptKey get 'aliyun private encyption method' decrypt key * * r0 = cmMeyfzJWyZcSwyH //rand * * r1 = md5(rand) * * r1 = r1.substring(8,24) * * iv = base64(r1).getBytes(); * * key1 = aes.decrypt(rnd,iv,iv) * * seed1 = md5(r0+key1) * * seed1 = seed1.substring(8,24) * * k2 = base64(seed1).getBytes(); * * key2 = aes.decrypt(plain,k2,iv); * * result = hex.encodeHexStr(base64.decode(key2)) @param cr client random string @param sr server response random string @param plainText server response plain text

func HmacSHA1Signature

func HmacSHA1Signature(accessKeySecret, stringToSign string) string

HmacSHA1Signature ...

func RSAEncrypt

func RSAEncrypt(origData []byte) (string, error)

RSAEncrypt ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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