anti_intip_variabel 1.2.9 copy "anti_intip_variabel: ^1.2.9" to clipboard
anti_intip_variabel: ^1.2.9 copied to clipboard

Meta package to include anti_intip and anti_intip_generator

🛡️ anti_intip_variabel #

Email LinkedIn Instagram

Meta package untuk melindungi rahasia aplikasi Flutter/Dart menggunakan teknik XOR obfuscation.
Cukup tambahkan package ini sekali, semua dependensi (anti_intip dan anti_intip_generator) akan otomatis tersedia.


✨ Fitur #

  • Simpan API key, token, dan rahasia lain tanpa hardcode string biasa.
  • String rahasia diubah menjadi cipher int array + seed, lalu hanya di-decode saat runtime.

❓ Kenapa Harus Pakai anti_intip_variabel? #

  • 🔒 Lebih Aman – String rahasia tidak langsung terlihat dalam file .apk/.ipa, sehingga sulit dicari dengan strings, grep, atau reverse engineering dasar.
  • 🛡️ Perlindungan Tambahan – Dibanding menyimpan plain text di kode, teknik XOR dengan seed unik membuat hasil build selalu berbeda.
  • ⚡ Ringan & Cepat – Proses encode/decode hanya integer operation sederhana, tanpa overhead besar di runtime.
  • 🔁 Otomatis & Konsisten – Semua file hasil generate dibuat otomatis via build_runner, jadi minim human error.
  • 🧩 Mudah Digunakan – Tinggal anotasi @AntiIntip, jalankan build, rahasia sudah terlindungi tanpa setup rumit.

🚀 Instalasi #

Tambahkan package ini ke file pubspec.yaml proyek Flutter/Dart Anda:

flutter pub add anti_intip_variabel
flutter pub add --dev build_runner


🛠️ Cara Pakai #

  • Buat file rahasia dengan nama bebas di folder /lib, contoh /lib/rahasia.dart. Gunakan anotasi @AntiIntip untuk variabel yang ingin Anda lindungi.
import 'package:anti_intip/anti_intip.dart';
part 'rahasia.jangan_hapus.dart';

@AntiIntip('https://api.example.com', noCache: true)
String get apiBaseUrl => _ai_apiBaseUrl();

@AntiIntip('super-secret-token')
String get apiToken => _ai_apiToken();

@AntiIntip('Rauf Endro Ganteng')
String get raufendro => _ai_raufendro();

  • Generate file otomatis Jalankan perintah berikut di root project Anda untuk menghasilkan file rahasia_jangan_hapus.dart:
dart run build_runner build

Setelah perintah dijalankan, akan terbentuk file baru lib/rahasia_jangan_hapus.dart. Jangan edit file ini, karena isinya otomatis dihasilkan.

Contoh isi file rahasia_jangan_hapus.dart yang dihasilkan:

// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'rahasia.dart';

// **************************************************************************
// AntiIntipGenerator
// **************************************************************************

@pragma('vm:prefer-inline')
String _ai_apiBaseUrl() {
  const _seed = 968623143;
  const _cipher = <int>[
    172,
    158,
    162,
    126,
    215,
    16,
    16,
    228,
    43,
    52,
    73,
    237,
    208,
    108,
    34,
    174,
    73,
    52,
    99,
    68,
    116,
    220,
    145
  ];
  return decodeXor(_cipher, _seed, noCache: true);
}

@pragma('vm:prefer-inline')
String _ai_apiToken() {
  const _seed = 1376473356;
  const _cipher = <int>[
    2,
    235,
    44,
    245,
    38,
    115,
    38,
    128,
    27,
    161,
    215,
    46,
    233,
    47,
    126,
    81,
    188,
    0
  ];
  return decodeXor(_cipher, _seed, noCache: false);
}

@pragma('vm:prefer-inline')
String _ai_raufendro() {
  const _seed = 2111612349;
  const _cipher = <int>[
    254,
    219,
    196,
    187,
    97,
    245,
    139,
    151,
    43,
    57,
    88,
    88,
    216,
    15,
    252,
    132,
    34,
    71
  ];
  return decodeXor(_cipher, _seed, noCache: false);
}

  • Gunakan variabel rahasia di kode Anda Import file rahasia.dart dan panggil variabel rahasia seperti biasa.
import 'rahasia.dart';

void main() {
  print(apiBaseUrl); // https://api.example.com
  print(apiToken);   // super-secret-token
}
1
likes
150
points
403
downloads

Publisher

unverified uploader

Weekly Downloads

Meta package to include anti_intip and anti_intip_generator

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

anti_intip, anti_intip_generator

More

Packages that depend on anti_intip_variabel