This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface AcraReport<T = unknown> { | |
REPORT_ID: string; | |
APP_VERSION_CODE: number; | |
APP_VERSION_NAME: string; | |
PACKAGE_NAME: string; | |
FILE_PATH: string; | |
PHONE_MODEL: string; | |
BRAND: string; | |
PRODUCT: string; | |
ANDROID_VERSION: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const crypto = require('crypto'); | |
module.exports = function (accessKey, secretKey, requestHeaders, httpMethod, path, payload, region, service, timestamp) { | |
const signedHeaders = createSignedHeaders(requestHeaders); | |
const canonicalRequest = createCanonicalRequest(httpMethod, path, requestHeaders, payload); | |
const stringToSign = createStringToSign(timestamp, region, service, canonicalRequest); | |
const signature = createSignature(secretKey, timestamp, region, service, stringToSign); | |
const authorizationHeader = createAuthorizationHeaders(timestamp, accessKey, region, service, signedHeaders, signature); |