HMAC-MD5
I have to encrypt a string with HMAC-MD5 in asp, like the function
MHASH_MD5 in php. Is anyone know how to proceed ?
I have to encrypt a string with HMAC-MD5 in asp, like the function
MHASH_MD5 in php. Is anyone know how to proceed ?
I need to convert the following PHP code to work in ASP (not .net) and I'm a little lost!
// Calculate signature using HMAC: http://www.faqs.org/rfcs/rfc2104.html
function calculate_RFC2104HMAC ($data, $key) {
return base64_encode (
pack("H*", sha1((str_pad($key, 64, chr(0x00))
^(str_repeat(chr(0x5c), 64))) .
pack("H*", sha1((str_pad($key, 64, chr(0x00))
^(str_repeat(chr(0x36), 64))) . $data))))
);
}
This code is directly from Amazon as part of the web
services, required for each submission. They have a lot
code samples but nothing in ASP. Any helpers ?