(buffer: ArrayBuffer)
| 39 | |
| 40 | // 将二进制数据转换为十六进制字符串 |
| 41 | function arrayBufferToHex(buffer: ArrayBuffer): string { |
| 42 | return Array.from(new Uint8Array(buffer)) |
| 43 | .map(b => b.toString(16).padStart(2, '0')) |
| 44 | .join(''); |
| 45 | } |
| 46 | |
| 47 | // 生成腾讯云API签名 |
| 48 | async function createTencentSignature(requestPayload: string, timestamp: number, secretId: string, secretKey: string): Promise<string> { |
no outgoing calls
no test coverage detected