dvote_crypto 0.10.2 copy "dvote_crypto: ^0.10.2" to clipboard
dvote_crypto: ^0.10.2 copied to clipboard

Flutter library providing both native and pure Dart implementations of cryptographic primitives

example/lib/main.dart

import 'package:dvote_crypto_example/signature.dart';
import 'package:flutter/material.dart';

import "./encryption.dart";
import "./hashing.dart";
import './wallet.dart';
import "./zk-snarks.dart";

void main() async {
  runApp(MaterialApp(
    title: 'DVote Flutter Crypto',
    home: ExampleApp(),
  ));
}

class ExampleApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('DVote Flutter Crypto'),
      ),
      body: ListView(
        children: <Widget>[
          Card(
            child: ListTile(
              leading: FlutterLogo(size: 72.0),
              title: Text('Wallet'),
              subtitle: Text('Generating wallets and computing keys'),
              isThreeLine: true,
              onTap: () => Navigator.push(context,
                  MaterialPageRoute(builder: (context) => WalletScreen())),
            ),
          ),
          Card(
            child: ListTile(
              leading: FlutterLogo(size: 72.0),
              title: Text('Signature'),
              subtitle: Text('Computing and verifying signatures'),
              isThreeLine: true,
              onTap: () => Navigator.push(context,
                  MaterialPageRoute(builder: (context) => SignatureScreen())),
            ),
          ),
          Card(
            child: ListTile(
              leading: FlutterLogo(size: 72.0),
              title: Text('Hashing'),
              subtitle: Text(
                  'Generating hashes that are efficient to use on a ZK circuit'),
              isThreeLine: true,
              onTap: () => Navigator.push(context,
                  MaterialPageRoute(builder: (context) => HashingScreen())),
            ),
          ),
          Card(
            child: ListTile(
              leading: FlutterLogo(size: 72.0),
              title: Text('Encryption'),
              subtitle:
                  Text('Encrypting and decrypting strings using SecretBox'),
              isThreeLine: true,
              onTap: () => Navigator.push(context,
                  MaterialPageRoute(builder: (context) => EncryptionScreen())),
            ),
          ),
          Card(
            child: ListTile(
              leading: FlutterLogo(size: 72.0),
              title: Text('ZK Snarks'),
              subtitle:
                  Text('Generating zero knowledge proofs given some inputs'),
              isThreeLine: true,
              onTap: () => Navigator.push(context,
                  MaterialPageRoute(builder: (context) => ZkProofsScreen())),
            ),
          ),
        ],
      ),
    );
  }
}
0
likes
40
pub points
0%
popularity

Publisher

unverified uploader

Flutter library providing both native and pure Dart implementations of cryptographic primitives

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation

License

LGPL-2.1 (license)

Dependencies

bip32, bip39, convert, crypto, ffi, flutter, hex, pinenacl, web3dart

More

Packages that depend on dvote_crypto