(function() {
  var crypto = require('crypto');
  var default_pass = 'some_password';

  module.exports = {
    encrypt: function(text, pass) {
      var cipher, crypted;
      if (pass == null) {
        pass = default_pass;
      }
      cipher = crypto.createCipher("aes-256-cbc", pass);
      crypted = cipher.update(text, "utf8", "hex");
      crypted += cipher.final("hex");
      return crypted;
    },
    decrypt: function(text, pass) {
      var dec, decipher;
      if (pass == null) {
        pass = default_pass;
      }
      decipher = crypto.createDecipher("aes-256-cbc", pass);
      dec = decipher.update(text, "hex", "utf8");
      dec += decipher.final("utf8");
      return dec;
    },
    gui: function() {
      return Math.random().toString(36).substring(2);
    }
  };

}).call(this);
(function() {
  var crypto = require('crypto');
  var default_pass = 'ENTER_YOUR_DEFAULT_PASSWORD';

  module.exports = {
    encrypt: function(text, pass) {
      var cipher, crypted;
      if (pass == null) {
        pass = default_pass;
      }
      cipher = crypto.createCipher("aes-256-cbc", pass);
      crypted = cipher.update(text, "utf8", "hex");
      crypted += cipher.final("hex");
      return crypted;
    },
    decrypt: function(text, pass) {
      var dec, decipher;
      if (pass == null) {
        pass = default_pass;
      }
      decipher = crypto.createDecipher("aes-256-cbc", pass);
      dec = decipher.update(text, "hex", "utf8");
      dec += decipher.final("utf8");
      return dec;
    },
    gui: function() {
      return Math.random().toString(36).substring(2);
    }
  };

}).call(this);

comment added to default pass