crypto_simple 3.0.0 copy "crypto_simple: ^3.0.0" to clipboard
crypto_simple: ^3.0.0 copied to clipboard

A library for encrypt and decrypt string , very light & simple and fast.

Screenshot

Crypto Simple plugin #

A library for encrypt and decrypt string , very light & simple and fast.

Install Package #

dependencies:
  crypto_simple: ^3.0.0

Add import #

import 'package:crypto_simple/src/crypto_simple.dart';

Super simple to use in Singleton & Classic objects. #


1️⃣ . How to using package as Singleton Object ?

- Define/Config Object:
import 'package:crypto_simple/src/crypto_simple.dart';

void main() {

  // set configuration for [CryptoSimpleSingleton] object , this part is mandatory
  // this object is singleton and easy to used 
  CryptoSimpleSingleton(
    superKey: 2023,
    subKey: 47,
    secretKey: "MySecretKey! ;)",// *Recommended
    encryptionMode: EncryptionMode.Randomized,
  );

  runApp(MyApp());
}
- Consume Object:
// Your string value.
String token = 'bearer 5@1#fG!';

// easy encrypt 🛡️ !
String encodeResult = CryptoSimple.instance.encryption(inputString: token);

// easy decrypt 🕵️‍♂️ !
String decodeResult = CryptoSimple.instance.decryption(encryptedString: encodeResult);


2️⃣ . How to using package as Classic Object ?


// Define `CryptoSimple` object and set encode/decode configurations
final CryptoSimple normalCrypto = CryptoSimple(
  superKey: 123,
  subKey: 22,
  secretKey: 'mySecretKey',
  encryptionMode: EncryptionMode.Randomized,
);

// Your string value.
String token = 'bearer 5@1#fG!';

// do encryption 🛡️ !
String encodeResult = normalCrypto.encryption(inputString: token);

// do decryption 🕵️‍♂️ !
String decodeResult = normalCrypto.decryption(encryptedString: encodeResult);

8
likes
140
pub points
69%
popularity
screenshot

Publisher

verified publisherea2.dev

A library for encrypt and decrypt string , very light & simple and fast.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on crypto_simple