if (fcf.isServer())
  var libCryptoJS = require("crypto-js");

fcf.module({
  name: "fcf:NSystem/authorizationHandler.js",
  dependencies: [],
  module: function(){
    var Namespace = fcf.prepareObject(fcf, "NAuthorization");

    class AuthorizationHandler {
      constructor(){
      }

      initialize(){
      }

      getDBPassword(a_pass){
        return libCryptoJS.SHA256(
                "oc" + libCryptoJS.MD5(
                  "mc" + libCryptoJS.SHA256(
                    "pf" + libCryptoJS.MD5(
                      "uq" + libCryptoJS.MD5("ifme"+ a_pass).toString()
                      ).toString()
                    ).toString()
                  ).toString()
                ).toString() +
              libCryptoJS.MD5(
                "c;l2" + libCryptoJS.MD5(
                  "opdfme" + libCryptoJS.SHA256(
                    "po1" + libCryptoJS.SHA256(
                      "oidf1[" + libCryptoJS.MD5("021"+ a_pass).toString()
                      ).toString()
                    ).toString()
                  ).toString()
                ).toString();
      }
    };

    Namespace.authorizationHandler = new AuthorizationHandler();

    return Namespace.authorizationHandler;
  }
});
