crypt2dart 0.0.4 copy "crypt2dart: ^0.0.4" to clipboard
crypt2dart: ^0.0.4 copied to clipboard

A new Flutter plugin.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:crypt2dart/crypt2dart.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _plainText = 'Unknown';
  String _encryptedString = '';
  String _decryptedString = '';


  @override
  void initState() {
    methoddemo();
    super.initState();
    initPlatformState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    String encryptedString;
    String plainText = '我是shyandsy,never give up man';
    String key = 'xxxxxxxxxxxxxxxx';
    String iv = 'yyyyyyyyyyyyyyyy';
    String decryptedString;

  }
 Future methoddemo() async {
   var ss ='{"formDeploymentId":"2b70abf6-d931-11e9-8a03-005056924137","id":"","processDeploymentId":"2c7b8603-d9ed-11e9-aec8-005056924137","templateId":21,"templateName":"加班申请-厦门微微","formValueJson":"{\"overTimeTypeName\":\"工作日\",\"overTimeType\":\"1\",\"startTime\":\"2019-11-21 19:46:00\",\"endTime\":\"2019-11-21 23:46:00\",\"duration\":240,\"reason\":\"大撒大撒\",\"attachment\":\"\"}","resourceRelation":[]}';

   var pp =  await Crypt2dart.encrypt(ss, 'VVuucs_sec201906', 'VVuucs_sec201906', 'VVuucskey201906');
   print(pp);

 }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Running on:'),
        ),
      ),
    );
  }
}
0
likes
20
pub points
0%
popularity

Publisher

unverified uploader

A new Flutter plugin.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on crypt2dart