"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));

var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));

var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));

var _lodash = _interopRequireDefault(require("lodash"));

var DKA = /*#__PURE__*/function () {
  /**
   *
   * @param Options
   */
  function DKA(Options) {
    (0, _classCallCheck2["default"])(this, DKA);
    this.Options = _lodash["default"].extend({
      KeySalt: "1q2w3e4r5t6y"
    }, Options);
  }
  /**
   *
   * @param {JSON | String} data
   * @param {String | Number } KeySalt
   * @returns {Promise<void>}
   */


  (0, _createClass2["default"])(DKA, [{
    key: "encode",
    value: function () {
      var _encode = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(data) {
        var KeySalt,
            _args = arguments;
        return _regenerator["default"].wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                KeySalt = _args.length > 1 && _args[1] !== undefined ? _args[1] : this.Options.KeySalt;

              case 1:
              case "end":
                return _context.stop();
            }
          }
        }, _callee, this);
      }));

      function encode(_x) {
        return _encode.apply(this, arguments);
      }

      return encode;
    }()
  }]);
  return DKA;
}();
//# sourceMappingURL=index.js.map