aes_ecb_pkcs5_flutter 0.1.2 copy "aes_ecb_pkcs5_flutter: ^0.1.2" to clipboard
aes_ecb_pkcs5_flutter: ^0.1.2 copied to clipboard

A flutter plugin, a library dedicated to aes_ecb_pkcs5 encryption and decryption, it has high performance and a simple API, small size and stable operation;

Null Safety support #

Fork packages flutter_aes_ecb_pkcs5

Solve the null safety support problem

AES 128 pkcs5 only support #

  • Provide generation of AES keys

  • Provide encrypt for AES keys

  • Provide decrypt for AES keys

  • Android uses java, iOS uses OC development

Usage #

Use this package as a library

  1. Depend on it Add this to your package's pubspec.yaml file:
dependencies:
  aes_ecb_pkcs5_flutter: ^0.1.1
  1. Install it You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

  1. Import it Now in your Dart code, you can use:
import 'package:aes_ecb_pkcs5_flutter/aes_ecb_pkcs5_flutter.dart';

AES Use Example

import 'package:aes_ecb_pkcs5_flutter/aes_ecb_pkcs5_flutter.dart';

void main() {

    var data = "{\"username\":\"helloword\"}";
    
    //generate a 16-byte random key
    var key = await FlutterAesEcbPkcs5.generateDesKey(128);
    
    print(key);
    //encrypt
    var encryptText = await FlutterAesEcbPkcs5.encryptString(data, key);
    
    print(encryptText);
    //decrypt
    var decryptText  = await FlutterAesEcbPkcs5.decryptString(encryptText, key);
    
    print(decryptText);
  
}

Run Example Result

data:{"username":"helloword"}
create key:DA8FD2693B652D587EEE51E7ADD9DBB8
encryptText :851544E224F6C1C7F560AB82889DE0DF66EEB6762AB836F4EE13E31100F0EA16
decryptText :{"username":"helloword"}

License

The MIT License(http://opensource.org/licenses/MIT)

Please feel free to use and contribute to the development.

2
likes
160
pub points
65%
popularity

Publisher

unverified uploader

A flutter plugin, a library dedicated to aes_ecb_pkcs5 encryption and decryption, it has high performance and a simple API, small size and stable operation;

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on aes_ecb_pkcs5_flutter