public static function encode($obj)
 {
     return MiscUtils::encrypt(json_encode($obj));
 }