private static IDictionary <string, string> SignRequestUrl(IDictionary <string, string> headers) { var imutableMap = new Dictionary <string, string>(headers); imutableMap.TryAdd("Date", SignatureHelper.GetRfc2616Date(DateTime.Now)); imutableMap.TryAdd("Accept", SignatureHelper.FormatTypeToString("Json")); imutableMap.TryAdd("x-acs-signature-method", HmacSha1Signer.GetSignatureMethod()); imutableMap.TryAdd("x-acs-signature-version", HmacSha1Signer.GetSignatureVersion()); return(imutableMap); }
private void ComposeRpcQueries(IDictionary <string, string> queries) { var timeStamp = SignatureHelper.FormatIso8601Date(DateTime.Now); queries.TryAdd("Action", Action); queries.TryAdd("Version", Version); queries.TryAdd("Format", Format); queries.TryAdd("RegionId", RegionId); queries.TryAdd("Timestamp", timeStamp); queries.TryAdd("SignatureMethod", HmacSha1Signer.GetSignatureMethod()); queries.TryAdd("SignatureVersion", HmacSha1Signer.GetSignatureVersion()); queries.TryAdd("SignatureNonce", HmacSha1Signer.GetSignatureNonce()); queries.TryAdd("AccessKeyId", AccessKeyId); }