UNPKG

arc4

Version:
17 lines (13 loc) 353 B
"use strict"; var min = __dirname + "/"; function normal(algorithm, password) { var Class; try { Class = require(min + algorithm + ".js"); } catch (e) { throw new TypeError("algorithm required"); } if (!password) throw new TypeError("password required"); return new Class(password); } module.exports = normal;