flutter_sodium 0.0.2 copy "flutter_sodium: ^0.0.2" to clipboard
flutter_sodium: ^0.0.2 copied to clipboard

discontinuedreplaced by: sodium_libs
outdatedDart 1 only

Flutter bindings for libsodium, a modern, easy-to-use crypto library.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'examples.dart';
import 'package:flutter_sodium/flutter_sodium.dart';

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

class MyApp extends StatelessWidget {
  runExamples() async {
    final version = await Sodium.sodiumVersionString();

    print('Sodium $version');

    await exampleCryptoAuth();
    await exampleCryptoBox();
    await exampleCryptoBoxDetached();
    await exampleCryptoBoxPrecalculated();
    await exampleCryptoBoxPrecalculatedDetached();
    await exampleCryptoBoxSeal();
    await exampleCryptoGenerichash();
    await exampleCryptoGenericHashNoKey();
    await exampleCryptoGenerichashMultiPart();
    await exampleCryptoKdf();
    await exampleCryptoKx();
    await exampleCryptoOnetimeauth();
    await exampleCryptoOnetimeauthMultiPart();
    await exampleCryptoPwhash();
    await exampleCryptoPwhashStr();
    await exampleCryptoScalarmult();
    await exampleCryptoSecretbox();
    await exampleCryptoSecretboxDetached();
    await exampleCryptoShorthash();
    await exampleCryptoSign();
    await exampleCryptoSignDetached();
    await exampleCryptoSignMultiPart();
    await exampleRandombytes();

    print('Examples completed');
  }

  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
          appBar: new AppBar(
            title: new Text('Flutter Sodium'),
          ),
          body: new Center(
              child: new RaisedButton(
                  child: new Text('Run samples'), onPressed: runExamples))),
    );
  }
}
25
likes
0
pub points
85%
popularity

Publisher

verified publisherfirstfloorsoftware.com

Flutter bindings for libsodium, a modern, easy-to-use crypto library.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_sodium