Skip to content

Commit

Permalink
Bugfix for #378
Browse files Browse the repository at this point in the history
  • Loading branch information
gabbifish committed Dec 21, 2018
1 parent 2a6ed4a commit 70dc145
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 77 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ TEST_SCRIPTS= $(TEST_COMMON) \
test/sha512_huge_test_messages.js test/sha512_huge_test.js \
test/sha512_test_brute_force.js \
test/srp_vectors.js test/srp_test.js \
test/z85_vectors.js test/z85_test.js
test/z85_vectors.js test/z85_test.js \
test/core_test.js

# Run all tests in node.js.
test: sjcl.js $(TEST_SCRIPTS) test/run_tests_node.js
Expand Down
2 changes: 1 addition & 1 deletion config.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
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
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
COMPRESS= core_closure.js
1 change: 1 addition & 0 deletions core/footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
}(sjcl)); /* This is opened by sjcl.js */
16 changes: 2 additions & 14 deletions core/sjcl.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
/** @fileOverview Javascript cryptography implementation.
*
* Crush to remove comments, shorten variable names and
* generally reduce transmission size.
*
* @author Emily Stark
* @author Mike Hamburg
* @author Dan Boneh
*/

"use strict";
/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */
/*global document, window, escape, unescape, module, require, Uint32Array */

/**
* The Stanford Javascript Crypto Library, top-level namespace.
* @namespace
Expand Down Expand Up @@ -101,3 +87,5 @@ var sjcl = {
}
}
};

(function (sjcl) { /* This will be closed by footer.js */
109 changes: 49 additions & 60 deletions sjcl.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/aes_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ new sjcl.test.TestCase("AES official known-answer tests", function (cb) {
this.require(sjcl.bitArray.equal(aes.decrypt(tv.ct), tv.pt), "decrypt "+len+" #"+i);
}
cb && cb();
});
});
6 changes: 6 additions & 0 deletions test/core_test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
new sjcl.test.TestCase("variable names that share space with compressed variable names", function (cb) {
t = 10; // assign anything to t
u = 10; // assign anything to u
this.pass()
cb && cb();
});

0 comments on commit 70dc145

Please sign in to comment.