Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
proxy
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.IO; using System.Net; using System.Security.Cryptography; using System.Text; namespace Rextester { public class Program { public static void Main(string[] args) { string Authorization = string.Empty; string currentDate = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss+0000"); StringBuilder toSign = new StringBuilder(); toSign.Append("POST").Append("\n") .Append("application/json").Append("\n") .Append(currentDate).Append("\n") .Append("http://testonlineproxyapi.hays.com/xawsproxy/api/alertsectorrefresh/masterdatarefreshservicetaskjob"); var secretKeyByteArray = Encoding.UTF8.GetBytes("QUxFUlRfU0VDUkVUX0tFWQ=="); byte[] signature = Encoding.UTF8.GetBytes(toSign.ToString()); using (HMACSHA256 hmac = new HMACSHA256(secretKeyByteArray)) { byte[] signatureBytes = hmac.ComputeHash(signature); string requestSignatureBase64String = Convert.ToBase64String(signatureBytes); Authorization = string.Format("{0}:{1}", "QUxFUlRfQ0xJRU5UX0tFWQ==", requestSignatureBase64String); Console.WriteLine("Authorization : "+Authorization); Console.WriteLine("currentDate : "+currentDate); } } } }
run
|
edit
|
history
|
help
0
Uri builder
buble sort
BTC sell estimator
EnumToList
Knapsack Problem
FizzBuzz C#
q3 .net
sorted array
1
UF pc