summaryrefslogtreecommitdiffstats
path: root/core/sjcl.js
diff options
context:
space:
mode:
authorSteve Thomas <Sc00bz@users.noreply.github.com>2015-11-01 14:36:28 -0600
committerSteve Thomas <Sc00bz@users.noreply.github.com>2015-11-01 14:36:28 -0600
commitdb7e40d449ab4ae65bacf267b38d1bf836b4fe54 (patch)
treef6f815673f56490c8ae3bfdc8ed9a5f4d9996f76 /core/sjcl.js
parent025908ef2b091faab75f60188654f789b691ff0d (diff)
parentf9a2494fae0dcddef493de453aa6ab69caa987cf (diff)
downloadsjcl-db7e40d449ab4ae65bacf267b38d1bf836b4fe54.zip
sjcl-db7e40d449ab4ae65bacf267b38d1bf836b4fe54.tar.gz
sjcl-db7e40d449ab4ae65bacf267b38d1bf836b4fe54.tar.bz2
Merge pull request #1 from bitwiseshiftleft/master
Update
Diffstat (limited to 'core/sjcl.js')
-rw-r--r--core/sjcl.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/core/sjcl.js b/core/sjcl.js
index 50e5307..8c9425d 100644
--- a/core/sjcl.js
+++ b/core/sjcl.js
@@ -10,7 +10,7 @@
"use strict";
/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */
-/*global document, window, escape, unescape */
+/*global document, window, escape, unescape, module, require, Uint32Array */
/** @namespace The Stanford Javascript Crypto Library, top-level namespace. */
var sjcl = {
@@ -42,25 +42,25 @@ var sjcl = {
/** @namespace Exceptions. */
exception: {
- /** @class Ciphertext is corrupt. */
+ /** @constructor Ciphertext is corrupt. */
corrupt: function(message) {
this.toString = function() { return "CORRUPT: "+this.message; };
this.message = message;
},
- /** @class Invalid parameter. */
+ /** @constructor Invalid parameter. */
invalid: function(message) {
this.toString = function() { return "INVALID: "+this.message; };
this.message = message;
},
- /** @class Bug or missing feature in SJCL. */
+ /** @constructor Bug or missing feature in SJCL. @constructor */
bug: function(message) {
this.toString = function() { return "BUG: "+this.message; };
this.message = message;
},
- /** @class Something isn't ready. */
+ /** @constructor Something isn't ready. */
notReady: function(message) {
this.toString = function() { return "NOT READY: "+this.message; };
this.message = message;
@@ -68,6 +68,11 @@ var sjcl = {
}
};
-if(typeof module != 'undefined' && module.exports){
+if(typeof module !== 'undefined' && module.exports){
module.exports = sjcl;
}
+if (typeof define === "function") {
+ define([], function () {
+ return sjcl;
+ });
+}