setHMACKey with B64
TitusInfo opened this issue · comments
When running SHA.js in server-side classic ASP, there is a problem converting the HMACKey from Base-64, which causes an incorrect HMAC to be generated. The line
l = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(q[f]);
should be:
l = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(q.charAt(f));
This is an easy enough fix but I'm shocked this hasn't cropped up in the last decade. Do you have an easy to repeat example of it breaking?
Can you try the sha.js in dceb277?
Completely understand. I realize it doesn't help much now but src_dev.js is the plaintext version which gets "compressed" into sha.js