Documentation ¶
Index ¶
- Constants
- func AESDecryptCBC(encrypted, key, iv []byte) (decrypted []byte)
- func AESDecryptECB(encrypted, key []byte) (decrypted []byte)
- func GetAESDecryptKey(cr, sr, plainText string) string
- func HmacSHA1Signature(accessKeySecret, stringToSign string) string
- func RSAEncrypt(origData []byte) (string, error)
Constants ¶
View Source
const ( // PublicKeyStr ... PublicKeyStr = `` /* 182-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func AESDecryptCBC ¶
AESDecryptCBC ...
func GetAESDecryptKey ¶
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 ¶
HmacSHA1Signature ...
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.