FSN#37544 HMAC bepaling voortaan door de DLL in plaats van sha1.wsc
svn path=/Website/trunk/; revision=30493
This commit is contained in:
@@ -1070,7 +1070,8 @@ var protectHMAC =
|
||||
__Log("hmacdata: " + data);
|
||||
//__Log("sleutel: "+ params.sleutel);
|
||||
var oCrypto = new ActiveXObject("SLNKDWF.Crypto");
|
||||
var hmac = oCrypto.b64_hmac_sha1(params.sleutel, data);
|
||||
var sig = oCrypto.hex_hmac_sha1(params.sleutel, data);
|
||||
var hmac = oCrypto.hex2base64(sig, false, true); // no padding, urlsafe
|
||||
oCrypto = null; // Caching klinkt leuk maar Oracle sessies blijven langer hangen?
|
||||
return ts+":"+hmac;
|
||||
},
|
||||
@@ -1104,7 +1105,8 @@ var protectHMAC =
|
||||
params.sleutel = params.sleutel || protectHMAC.getProtectSecret();
|
||||
//__Log("testing sleutel: "+ params.sleutel);
|
||||
var oCrypto = new ActiveXObject("SLNKDWF.Crypto");
|
||||
var should_hmac = oCrypto.b64_hmac_sha1(params.sleutel, hmacArr[0] + ":" + str);
|
||||
var sig = oCrypto.hex_hmac_sha1(params.sleutel, hmacArr[0] + ":" + str);
|
||||
var should_hmac = oCrypto.hex2base64(sig, false, true); // no padding, urlsafe
|
||||
oCrypto = null;
|
||||
|
||||
if (hmacArr[1] != should_hmac)
|
||||
|
||||
Reference in New Issue
Block a user