summaryrefslogtreecommitdiff
path: root/alarm/node_modules/node-forge/js/mgf.js
diff options
context:
space:
mode:
Diffstat (limited to 'alarm/node_modules/node-forge/js/mgf.js')
-rw-r--r--alarm/node_modules/node-forge/js/mgf.js67
1 files changed, 67 insertions, 0 deletions
diff --git a/alarm/node_modules/node-forge/js/mgf.js b/alarm/node_modules/node-forge/js/mgf.js
new file mode 100644
index 0000000..927082a
--- /dev/null
+++ b/alarm/node_modules/node-forge/js/mgf.js
@@ -0,0 +1,67 @@
+/**
+ * Node.js module for Forge mask generation functions.
+ *
+ * @author Stefan Siegl
+ *
+ * Copyright 2012 Stefan Siegl <stesie@brokenpipe.de>
+ */
+(function() {
+/* ########## Begin module implementation ########## */
+function initModule(forge) {
+
+forge.mgf = forge.mgf || {};
+forge.mgf.mgf1 = forge.mgf1;
+
+} // end module implementation
+
+/* ########## Begin module wrapper ########## */
+var name = 'mgf';
+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') {
+ forge = {};
+ }
+ return initModule(forge);
+ }
+}
+// AMD
+var deps;
+var defineFunc = function(require, module) {
+ module.exports = function(forge) {
+ var mods = deps.map(function(dep) {
+ return require(dep);
+ }).concat(initModule);
+ // 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[name];
+ };
+};
+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', './mgf1'], function() {
+ defineFunc.apply(null, Array.prototype.slice.call(arguments, 0));
+});
+})();