I'm not very familiar with C# and recently was given a example code piece to access a system through REST. The LWP agent stuff I can handle. But the system requires me to make use a HMAC created from three values as a special key. I though I could duplicate it with Digest::HMAC but seem to be doing something wrong.
Here the original code:
string dateTimeString = DateTime.UtcNow.ToString("R", CultureInfo.Inva
+riantCulture);
string hashString = ComputeHash(strTenant + dateTimeString, key);
Here what I wrote in perl:
my $dateTimeString = strftime('%a, %e %b %Y %T',localtime);
my $data = $strTenant.$dateTimeString.' UTC';
$digest = hmac_md5($data, $pkey);