private static String PrepareAuthorizationStringWithUrlParam(BaseRequestV2 request, 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); }