Closed program-spiritual closed 3 months ago
public getSignature(method: string, nonce_str: string, timestamp: string, url: string, body?: string | Record<string, any>): string { let str = method + '\n' + url + '\n' + timestamp + '\n' + nonce_str + '\n'; if (body && body instanceof Object) body = JSON.stringify(body); if (body) str = str + body + '\n'; if (method === 'GET') str = str + '\n'; return this.sha256WithRsa(str); }
代码提升空间很大
代码提升空间很大