encrypt_decrypt_plus 1.7.0 copy "encrypt_decrypt_plus: ^1.7.0" to clipboard
encrypt_decrypt_plus: ^1.7.0 copied to clipboard

This package helps to encryption and decryption with or without secret key and JWT decode.

encrypt_decrypt_plus #

This package helps to encryption and decryption with or without secret key.

Using #

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile and web development, and a full API reference.

Installation #

First, add encrypt_decrypt_plus as a dependency in your pubspec.yaml file.

In your flutter project add the dependency:

dependencies:
  ...
  encrypt_decrypt_plus:

For help getting started with Flutter, view the online documentation.

Example #

Please follow this example here.

AES Encryption and Decryption #

  • AES-256-CBC
AES aes = AES(secretKey: "datadirr", iv: "datadirr");
String encryptTxt = aes.encryptAES256CBC("Hello datadirr");
String decryptTxt = aes.decryptAES256CBC(encryptTxt);

XOR Encryption and Decryption #

  1. With Secret Key
  • Method 1
XOR xor = XOR(secretKey: "datadirr");
String encryptTxt = xor.xorEncode("Hello datadirr");
String decryptTxt = xor.xorDecode(encryptTxt);
  • Method 2
XOR xor = XOR();
String encryptTxt = xor.xorEncode("Hello datadirr", secretKey: "datadirr");
String decryptTxt = xor.xorDecode(encryptTxt, secretKey: "datadirr");
  • Method 3
String encryptTxt = XOR().xorEncode("Hello datadirr", secretKey: "datadirr");
String decryptTxt = XOR().xorDecode(encryptTxt, secretKey: "datadirr");
  • Method 4
String encryptTxt = XOR(secretKey: "datadirr").xorEncode("Hello datadirr");
String decryptTxt = XOR(secretKey: "datadirr").xorDecode(encryptTxt);
  1. Without Secret Key
  • Method 1
XOR xor = XOR();
String encryptTxt = xor.xorEncode("Hello datadirr");
String decryptTxt = xor.xorDecode(encryptTxt);
  • Method 2
String encryptTxt = XOR().xorEncode("Hello datadirr");
String decryptTxt = XOR().xorDecode(encryptTxt);

JWT token decode #

JWT.decode("jwt_token");
9
likes
150
points
821
downloads

Publisher

verified publisherdatadirr.com

Weekly Downloads

This package helps to encryption and decryption with or without secret key and JWT decode.

Homepage
Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

encrypt, flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on encrypt_decrypt_plus