Skip to content
pubscout

crypto_simple

3.0.2, released 2 years ago by ea2.dev

Lightweight library for encrypting and decrypting strings with optional XOR and randomized modes.

$ flutter pub add crypto_simple
Source repository

What it does

Provides a simple API to encrypt and decrypt strings using basic algorithms. Supports both singleton and classic usage patterns.

AI-written summary of version 3.0.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Need quick string encryption in small projects
  • Want a minimal dependency for simple obfuscation
  • Prefer a straightforward API without code generation

Skip it when

  • Handling highly sensitive data that requires audited cryptography
  • Building production‑grade security solutions
  • Relying on encryption for compliance‑critical use cases

Strengths

  • Very small footprint
  • Easy to use API with singleton support
  • Supports multiple platforms including web

Weaknesses

  • Uses basic XOR‑based algorithms, not cryptographically strong
  • No formal security audit documented
  • Limited feature set

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Add dependency in pubspec and import package

import 'package:crypto_simple/crypto_simple.dart';

void main(){
  CryptoSimpleSingleton(
    superKey: 2023,
    subKey: 47,
    secretKey: "MySecretKey! ;)",
    encryptionMode: EncryptionMode.Randomized,
  );
  String token = 'bearer 5@1#fG!';
  String enc = CryptoSimpleSingleton.instance.encryption(inputString: token);
  String dec = CryptoSimpleSingleton.instance.decryption(encryptedString: enc);
}

Alternatives

Packages that do the same job and could replace crypto_simple.

  • validators2

    String validation and sanitization for Dart.

  • string_contains

    String scanner extensions and widgets to detect and clean bad words, URLs, emails, phones, and tags.

  • ninja

    Cryptography library for Dart to encrypt, decrypt, sign, and verify messages using RSA and AES.

  • rsa_encrypt

    RSA encryption/decryption with key generation for Flutter apps