summaryrefslogtreecommitdiff
path: root/alarm/node_modules/node-forge/js/forge.js
diff options
context:
space:
mode:
Diffstat (limited to 'alarm/node_modules/node-forge/js/forge.js')
-rw-r--r--alarm/node_modules/node-forge/js/forge.js92
1 files changed, 92 insertions, 0 deletions
diff --git a/alarm/node_modules/node-forge/js/forge.js b/alarm/node_modules/node-forge/js/forge.js
new file mode 100644
index 0000000..b314e22
--- /dev/null
+++ b/alarm/node_modules/node-forge/js/forge.js
@@ -0,0 +1,92 @@
+/**
+ * Node.js module for Forge.
+ *
+ * @author Dave Longley
+ *
+ * Copyright 2011-2014 Digital Bazaar, Inc.
+ */
+(function() {
+var name = 'forge';
+if(typeof define !== 'function') {
+ // NodeJS -> AMD
+ if(typeof module === 'object' && module.exports) {
+ var nodeJS = true;
+ define = function(ids, factory) {
+ factory(require, module);
+ };
+ } else {
+ // <script>
+ if(typeof forge === 'undefined') {
+ // set to true to disable native code if even it's available
+ forge = {disableNativeCode: false};
+ }
+ return;
+ }
+}
+// AMD
+var deps;
+var defineFunc = function(require, module) {
+ module.exports = function(forge) {
+ var mods = deps.map(function(dep) {
+ return require(dep);
+ });
+ // handle circular dependencies
+ forge = forge || {};
+ forge.defined = forge.defined || {};
+ if(forge.defined[name]) {
+ return forge[name];
+ }
+ forge.defined[name] = true;
+ for(var i = 0; i < mods.length; ++i) {
+ mods[i](forge);
+ }
+ return forge;
+ };
+ // set to true to disable native code if even it's available
+ module.exports.disableNativeCode = false;
+ module.exports(module.exports);
+};
+var tmpDefine = define;
+define = function(ids, factory) {
+ deps = (typeof ids === 'string') ? factory.slice(2) : ids.slice(2);
+ if(nodeJS) {
+ delete define;
+ return tmpDefine.apply(null, Array.prototype.slice.call(arguments, 0));
+ }
+ define = tmpDefine;
+ return define.apply(null, Array.prototype.slice.call(arguments, 0));
+};
+define([
+ 'require',
+ 'module',
+ './aes',
+ './aesCipherSuites',
+ './asn1',
+ './cipher',
+ './cipherModes',
+ './debug',
+ './des',
+ './hmac',
+ './kem',
+ './log',
+ './md',
+ './mgf1',
+ './pbkdf2',
+ './pem',
+ './pkcs7',
+ './pkcs1',
+ './pkcs12',
+ './pki',
+ './prime',
+ './prng',
+ './pss',
+ './random',
+ './rc2',
+ './ssh',
+ './task',
+ './tls',
+ './util'
+], function() {
+ defineFunc.apply(null, Array.prototype.slice.call(arguments, 0));
+});
+})();