tencent cloud

All product documents
Tencent Cloud Super App as a Service
Header Information
Last updated: 2025-03-19 18:55:33
Header Information
Last updated: 2025-03-19 18:55:33
Note
Only supported on SaaS.

Common request header information

Header
Description
Example
TC-Timestamp
Timestamp in milliseconds.
1735293931220
TC-Signature
Signature string.
xxx

Signature type

Advanced Electronic Signature (AES)

Example

current := timeutils.GetCurrentTimestamp()
Signature:=cryptoutils.InnerEncrypt(current,secret)

func InnerEncrypt(data, secretKey string) (string, error) {
aesKey := []byte(secretKey)
block, err := aes.NewCipher(aesKey)
if err != nil {
return "", err
}
blockSize := block.BlockSize()
origData := c.PKCS7Padding([]byte(data), blockSize)
blockMode := cipher.NewCBCEncrypter(block, aesKey[:blockSize])
encipheredData := make([]byte, len(origData))
blockMode.CryptBlocks(encipheredData, origData)
return hex.EncodeToString(encipheredData), nil
}




Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support