code: function onSave(iObj, opt, fn) {
        /* Check if crypto is disabled */
        if (typeof opt === 'object' && opt && opt.crypto === false) return fn();
        /* for each field, check if we have to encrypt*/
        let encrypted = modelObj.getEncrypted();
        for (let i = 0, len = encrypted.length; i < len; i++) {
          let fieldName = encrypted[i],
            fieldValue = iObj.getDataValue(fieldName);
          if (typeof fieldValue === 'undefined') {  // check default value;
            let _default = modelObj.fields[fieldName]._default;
            if (typeof _default !== 'undefined' && _default != null) {
              fieldValue = (typeof _default === 'function' ? _default() : _default);
            }
          }
          if (typeof fieldValue === 'undefined' || fieldValue === null) continue;
          // we now place it encrypted.
          if (crypto.isEncrypted(fieldValue)) continue;
          let enc = crypto.encrypt(fieldValue, opt.key);
          if (enc === null) continue;
          if (!iObj._changed[fieldName]) continue;
          iObj.setDataValue(fieldName, enc);
          if (typeof iObj.__original_encrypted === 'undefined') {
            iObj.__original_encrypted = {};
          }
          iObj.__original_encrypted[fieldName] = fieldValue;
        }
        if (typeof fn === 'function') {
          fn();
        }
      }
docs: /* BEFORE save