cryppo 0.4.0 copy "cryppo: ^0.4.0" to clipboard
cryppo: ^0.4.0 copied to clipboard

A simplified cryptographic library by Meeco - encrypt and decrypt as well as sign and verify data.

example/lib/main.dart

import './gcm_page.dart';
import './rsa_page.dart';
import 'package:flutter/material.dart';

void main() async {
  runApp(CryppoDemoApp());
}

class CryppoDemoApp extends StatefulWidget {
  @override
  _CryppoDemoAppState createState() => _CryppoDemoAppState();
}

class _CryppoDemoAppState extends State<CryppoDemoApp> {
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () {
        FocusScope.of(context).requestFocus(new FocusNode());
      },
      child: MaterialApp(
        title: 'Cryppo Demo',
        home: BottomTabBar(),
      ),
    );
  }
}

class BottomTabBar extends StatefulWidget {
  BottomTabBar();

  @override
  _BottomTabBarState createState() => _BottomTabBarState();
}

class _BottomTabBarState extends State<BottomTabBar> {
  int _selectedIndex = 0;
  static const pageTitles = ['RSA', 'AES', 'File'];
  static List<Widget> _widgetOptions = <Widget>[
    RsaPage(),
    GcmPage(),
  ];

  void _onItemTapped(int index) {
    setState(() {
      _selectedIndex = index;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(pageTitles[_selectedIndex]),
      ),
      body: Center(
        child: _widgetOptions.elementAt(_selectedIndex),
      ),
      bottomNavigationBar: BottomNavigationBar(
        items: const <BottomNavigationBarItem>[
          BottomNavigationBarItem(
            icon: Icon(Icons.enhanced_encryption),
            label: 'RSA',
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.lock),
            label: 'AES',
          ),
        ],
        currentIndex: _selectedIndex,
        selectedItemColor: Colors.amber[800],
        onTap: _onItemTapped,
      ),
    );
  }
}
3
likes
140
points
29
downloads

Publisher

verified publishermeeco.me

Weekly Downloads

A simplified cryptographic library by Meeco - encrypt and decrypt as well as sign and verify data.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

asn1lib, basic_utils, bson, cryptography, ninja, pointycastle

More

Packages that depend on cryppo