js/src/jit-test/tests/jaeger/bug656096.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 function aes(a) {
michael@0 2 d = a.slice()
michael@0 3 for (; a < 28; a++)
michael@0 4 d[0] = d[0] ^ undefined
michael@0 5 }
michael@0 6 var sjcl = {};
michael@0 7 sjcl.bitArray = {
michael@0 8 concat: function (a, b) {
michael@0 9 return d ? a : [];
michael@0 10 },
michael@0 11 clamp: function (a, b) {
michael@0 12 return a
michael@0 13 }
michael@0 14 };
michael@0 15 function G(a, b, c, d, e, f) {
michael@0 16 var g = [],
michael@0 17 h = sjcl.bitArray,
michael@0 18 f = [];
michael@0 19 f = h.concat(f, c)
michael@0 20 if (c) g = []
michael@0 21 else c = h.concat([], [])
michael@0 22 h.concat(g, d)
michael@0 23 h.clamp(f, [1,2,3])
michael@0 24 }
michael@0 25 function decrypt(a, b, c, d, e) {
michael@0 26 G(a, 1, c, d, e, b)
michael@0 27 var g = [],
michael@0 28 h = sjcl.bitArray,
michael@0 29 f = [];
michael@0 30 h.concat(f, c)
michael@0 31 if (c) g = []
michael@0 32 else c = h.concat([], [])
michael@0 33 h.concat(g, d)
michael@0 34 h.concat([], c).concat.slice
michael@0 35 }
michael@0 36 aes(sjcl.bitArray.clamp([]));
michael@0 37 decrypt(1, 2, 3);

mercurial