node-forge
Advanced tools
Comparing version 0.1.10 to 0.1.11
@@ -1252,8 +1252,7 @@ /** | ||
var name = 'aes'; | ||
var deps = ['./util']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -1267,7 +1266,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -1291,10 +1290,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './util'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -260,8 +260,7 @@ /** | ||
var name = 'aesCipherSuites'; | ||
var deps = ['./aes', './tls']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -275,7 +274,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -299,10 +298,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './tls'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -1024,8 +1024,7 @@ /** | ||
var name = 'asn1'; | ||
var deps = ['./util', './oids']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -1039,7 +1038,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -1063,10 +1062,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './util', './oids'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -90,8 +90,7 @@ /** | ||
var name = 'debug'; | ||
var deps = []; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -105,7 +104,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -129,10 +128,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -422,8 +422,7 @@ /** | ||
var name = 'des'; | ||
var deps = ['./util']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -437,7 +436,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -461,10 +460,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './util'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -10,31 +10,7 @@ /** | ||
var name = 'forge'; | ||
var deps = [ | ||
'./aes', | ||
'./aesCipherSuites', | ||
'./asn1', | ||
'./debug', | ||
'./des', | ||
'./hmac', | ||
'./log', | ||
'./pbkdf2', | ||
'./pem', | ||
'./pkcs7', | ||
'./pkcs1', | ||
'./pkcs12', | ||
'./pki', | ||
'./prng', | ||
'./pss', | ||
'./random', | ||
'./rc2', | ||
'./task', | ||
'./tls', | ||
'./util', | ||
'./md', | ||
'./mgf1' | ||
]; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -49,6 +25,7 @@ }; | ||
} | ||
return; | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -75,10 +52,40 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', | ||
'./debug', | ||
'./des', | ||
'./hmac', | ||
'./log', | ||
'./pbkdf2', | ||
'./pem', | ||
'./pkcs7', | ||
'./pkcs1', | ||
'./pkcs12', | ||
'./pki', | ||
'./prng', | ||
'./pss', | ||
'./random', | ||
'./rc2', | ||
'./task', | ||
'./tls', | ||
'./util', | ||
'./md', | ||
'./mgf1' | ||
], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -156,8 +156,7 @@ /** | ||
var name = 'hmac'; | ||
var deps = ['./md', './util']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -171,7 +170,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -195,10 +194,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './md', './util'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -1274,8 +1274,7 @@ // Copyright (c) 2005 Tom Wu | ||
var name = 'jsbn'; | ||
var deps = []; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -1289,7 +1288,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -1313,10 +1312,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -328,8 +328,7 @@ /** | ||
var name = 'log'; | ||
var deps = ['./util']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -343,7 +342,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -367,10 +366,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './util'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
30
js/md.js
@@ -26,8 +26,7 @@ /** | ||
var name = 'md'; | ||
var deps = ['./md5', './sha1', './sha256']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -41,7 +40,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -65,10 +64,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './md5', './sha1', './sha256'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -270,8 +270,7 @@ /** | ||
var name = 'md5'; | ||
var deps = ['./util']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -285,7 +284,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -309,10 +308,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './util'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -19,8 +19,7 @@ /** | ||
var name = 'mgf'; | ||
var deps = ['./mgf1']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -34,7 +33,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -58,10 +57,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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)); | ||
}); | ||
})(); |
@@ -60,8 +60,7 @@ /** | ||
var name = 'mgf1'; | ||
var deps = ['./util']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -75,7 +74,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -99,10 +98,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './util'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -216,8 +216,7 @@ /** | ||
var name = 'oids'; | ||
var deps = []; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -231,7 +230,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -255,10 +254,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -113,8 +113,7 @@ /** | ||
var name = 'pbkdf2'; | ||
var deps = ['./hmac', './md', './util']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -128,7 +127,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -152,10 +151,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './hmac', './md', './util'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -250,8 +250,7 @@ /** | ||
var name = 'pem'; | ||
var deps = ['./util']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -265,7 +264,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -289,10 +288,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './util'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -266,8 +266,7 @@ /** | ||
var name = 'pkcs1'; | ||
var deps = ['./util', './random', './sha1']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -281,7 +280,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -305,10 +304,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './util', './random', './sha1'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -1092,16 +1092,7 @@ /** | ||
var name = 'pkcs12'; | ||
var deps = [ | ||
'./asn1', | ||
'./sha1', | ||
'./pkcs7asn1', | ||
'./pki', | ||
'./util', | ||
'./random', | ||
'./hmac' | ||
]; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -1115,7 +1106,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -1139,10 +1130,25 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', | ||
'./asn1', | ||
'./sha1', | ||
'./pkcs7asn1', | ||
'./pki', | ||
'./util', | ||
'./random', | ||
'./hmac' | ||
], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -678,17 +678,7 @@ /** | ||
var name = 'pkcs7'; | ||
var deps = [ | ||
'./aes', | ||
'./asn1', | ||
'./des', | ||
'./pem', | ||
'./pkcs7asn1', | ||
'./pki', | ||
'./random', | ||
'./util' | ||
]; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -702,7 +692,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -726,10 +716,26 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', | ||
'./asn1', | ||
'./des', | ||
'./pem', | ||
'./pkcs7asn1', | ||
'./pki', | ||
'./random', | ||
'./util' | ||
], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -349,8 +349,7 @@ /** | ||
var name = 'pkcs7asn1'; | ||
var deps = ['./asn1', './util']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -364,7 +363,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -388,10 +387,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './asn1', './util'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -397,8 +397,7 @@ /** | ||
var name = 'prng'; | ||
var deps = ['./md', './util']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -412,7 +411,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -436,10 +435,16 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './md', './util'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -206,8 +206,7 @@ /** | ||
var name = 'pss'; | ||
var deps = ['./random', './util']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -221,7 +220,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -245,10 +244,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './random', './util'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -172,8 +172,7 @@ /** | ||
var name = 'random'; | ||
var deps = ['./aes', './md', './prng', './util']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -187,7 +186,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -211,10 +210,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './md', './prng', './util'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -423,8 +423,7 @@ /** | ||
var name = 'rc2'; | ||
var deps = ['./util']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -438,7 +437,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -462,10 +461,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './util'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -1244,8 +1244,7 @@ /** | ||
var name = 'rsa'; | ||
var deps = ['./asn1', './oids', './random', './util', './jsbn', './pkcs1']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -1259,7 +1258,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -1283,10 +1282,24 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', | ||
'./asn1', | ||
'./oids', | ||
'./random', | ||
'./util', | ||
'./jsbn', | ||
'./pkcs1' | ||
], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -290,8 +290,7 @@ /** | ||
var name = 'sha1'; | ||
var deps = ['./util']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -305,7 +304,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -329,10 +328,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './util'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -300,8 +300,7 @@ /** | ||
var name = 'sha256'; | ||
var deps = ['./util']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -315,7 +314,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -339,10 +338,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './util'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -295,8 +295,7 @@ /** | ||
var name = 'net'; | ||
var deps = []; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -310,7 +309,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -334,10 +333,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -741,8 +741,7 @@ /** | ||
var name = 'task'; | ||
var deps = ['./debug', './log', './util']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -756,7 +755,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -780,10 +779,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './debug', './log', './util'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -257,8 +257,7 @@ /** | ||
var name = 'tlssocket'; | ||
var deps = ['./tls']; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -272,7 +271,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -296,10 +295,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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', './tls'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -1544,8 +1544,7 @@ /** | ||
var name = 'util'; | ||
var deps = []; | ||
var nodeDefine = null; | ||
if(typeof define !== 'function') { | ||
// NodeJS -> AMD | ||
if(typeof module === 'object' && module.exports) { | ||
nodeDefine = function(ids, factory) { | ||
var nodeJS = true; | ||
define = function(ids, factory) { | ||
factory(require, module); | ||
@@ -1559,7 +1558,7 @@ }; | ||
} | ||
initModule(forge); | ||
return initModule(forge); | ||
} | ||
} | ||
// AMD | ||
var defineDeps = ['require', 'module'].concat(deps); | ||
var deps; | ||
var defineFunc = function(require, module) { | ||
@@ -1583,10 +1582,15 @@ module.exports = function(forge) { | ||
}; | ||
if(nodeDefine) { | ||
nodeDefine(defineDeps, defineFunc); | ||
} | ||
else if(typeof define === 'function') { | ||
define([].concat(defineDeps), function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
} | ||
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'], function() { | ||
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0)); | ||
}); | ||
})(); |
@@ -1,5 +0,4 @@ | ||
((function() { | ||
(function() { | ||
function Tests(ASSERT, PKI, RSA) { | ||
describe('pki', function() { | ||
@@ -12,3 +11,2 @@ it('generate 128 bit key pair', function() { | ||
}); | ||
} | ||
@@ -38,2 +36,2 @@ | ||
})()); | ||
})(); |
{ | ||
"name": "node-forge", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"description": "JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilties.", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/digitalbazaar/forge", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1681382
157
32196
3