Skip to content

Commit 70dc145

Browse files
committed
Bugfix for #378
1 parent 2a6ed4a commit 70dc145

File tree

7 files changed

+62
-77
lines changed

7 files changed

+62
-77
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ TEST_SCRIPTS= $(TEST_COMMON) \
8181
test/sha512_huge_test_messages.js test/sha512_huge_test.js \
8282
test/sha512_test_brute_force.js \
8383
test/srp_vectors.js test/srp_test.js \
84-
test/z85_vectors.js test/z85_test.js
84+
test/z85_vectors.js test/z85_test.js \
85+
test/core_test.js
8586

8687
# Run all tests in node.js.
8788
test: sjcl.js $(TEST_SCRIPTS) test/run_tests_node.js

config.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
SOURCES= core/sjcl.js core/aes.js core/bitArray.js core/codecString.js core/codecHex.js core/codecBase32.js core/codecBase64.js core/sha256.js core/ccm.js core/ocb2.js core/gcm.js core/hmac.js core/pbkdf2.js core/random.js core/convenience.js core/exports.js
1+
SOURCES= core/sjcl.js core/aes.js core/bitArray.js core/codecString.js core/codecHex.js core/codecBase32.js core/codecBase64.js core/sha256.js core/ccm.js core/ocb2.js core/gcm.js core/hmac.js core/pbkdf2.js core/random.js core/convenience.js core/exports.js core/footer.js
22
COMPRESS= core_closure.js

core/footer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
}(sjcl)); /* This is opened by sjcl.js */

core/sjcl.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
/** @fileOverview Javascript cryptography implementation.
2-
*
3-
* Crush to remove comments, shorten variable names and
4-
* generally reduce transmission size.
5-
*
6-
* @author Emily Stark
7-
* @author Mike Hamburg
8-
* @author Dan Boneh
9-
*/
10-
11-
"use strict";
12-
/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */
13-
/*global document, window, escape, unescape, module, require, Uint32Array */
14-
151
/**
162
* The Stanford Javascript Crypto Library, top-level namespace.
173
* @namespace
@@ -101,3 +87,5 @@ var sjcl = {
10187
}
10288
}
10389
};
90+
91+
(function (sjcl) { /* This will be closed by footer.js */

sjcl.js

Lines changed: 49 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/aes_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ new sjcl.test.TestCase("AES official known-answer tests", function (cb) {
1515
this.require(sjcl.bitArray.equal(aes.decrypt(tv.ct), tv.pt), "decrypt "+len+" #"+i);
1616
}
1717
cb && cb();
18-
});
18+
});

test/core_test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
new sjcl.test.TestCase("variable names that share space with compressed variable names", function (cb) {
2+
t = 10; // assign anything to t
3+
u = 10; // assign anything to u
4+
this.pass()
5+
cb && cb();
6+
});

0 commit comments

Comments
 (0)