encodeHex($str); } public static function decodeHex($str, $hashLength = 5) { $salt = Config::getByName('salt')['value']; $hashids = self::getInstanceHashids($salt, $hashLength); return $hashids->decodeHex($str); } }