private static string PrepareAuthorizationStringWithUrlParam(string url, Options options) { string randomKey = GenerateRandomKey(); string uriPath = FindUriPath(url); string dataToEncrypt = randomKey + uriPath; string hash = HashGeneratorV2.GenerateHash(options.ApiKey, options.SecretKey, randomKey, dataToEncrypt); return(IYZIWS_V2_HEADER_NAME + hash); }
private static string PrepareAuthorizationStringWithRequestBody(BaseRequestV2 request, string url, Options options) { string randomKey = GenerateRandomKey(); string uriPath = FindUriPath(url); string payload = request != null ? uriPath + JsonBuilder.SerializeObjectToPrettyJson(request) : uriPath; string dataToEncrypt = randomKey + payload; string hash = HashGeneratorV2.GenerateHash(options.ApiKey, options.SecretKey, randomKey, dataToEncrypt); return(IYZIWS_V2_HEADER_NAME + hash); }