workaround for bug in Opera 10.60 a1. should get rolled back if that bug is fixed

This commit is contained in:
Mike Hamburg 2010-06-11 14:43:19 -07:00
parent 6efa96883e
commit c3435d1be3
3 changed files with 13 additions and 12 deletions

View file

@ -136,13 +136,13 @@ sjcl.mode.ccm = {
// mac the data itself
macData = w.concat(macData, adata);
for (i=0; i<macData.length; i += 4) {
mac = prf.encrypt(xor(mac, macData.slice(i,i+4)));
mac = prf.encrypt(xor(mac, macData.slice(i,i+4).concat([0,0,0])));
}
}
// mac the plaintext
for (i=0; i<plaintext.length; i+=4) {
mac = prf.encrypt(xor(mac, plaintext.slice(i,i+4)));
mac = prf.encrypt(xor(mac, plaintext.slice(i,i+4).concat([0,0,0])));
}
return w.clamp(mac, tlen * 8);