snaxdart_ecc 1.0.0

  • Readme
  • Changelog
  • Installing
  • 54

Elliptic curve cryptography (ECC) in Dart #

Elliptic curve cryptography lib for EOS based blockchain in Dart lang.

Build Status

Usage #

A simple usage example:

import 'package:snaxdart_ecc/snaxdart_ecc.dart';

main() {
  // Construct the SNAX private key from string
  SNAXPrivateKey privateKey = SNAXPrivateKey.fromString(

  // Get the related SNAX public key
  SNAXPublicKey publicKey = privateKey.toSNAXPublicKey();
  // Print the SNAX public key

  // Going to sign the data
  String data = 'data';

  // Sign
  SNAXSignature signature = privateKey.signString(data);
  // Print the SNAX signature

  // Verify the data using the signature
  signature.verify(data, publicKey);

Features and bugs #

Please file feature requests and bugs at the issue tracker.

References #


1.0.0 #

  • migrate to Snax

0.3.2 #

  • fix signature bug

0.3.1 #

  • sign method will sign Uint8List
  • add signString method which signs String

0.3.0 #

  • Support canonical signature

0.2.2 #

  • Healthy change

0.2.1 #

  • Add

0.2.0 #

  • SNAXPublicKey, SNAXPrivateKey, SNAXSignature
  • Sign the data
  • Verify the signature

0.1.0 #

  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  snaxdart_ecc: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:snaxdart_ecc/snaxdart_ecc.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 21, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health suggestions

Fix lib/src/key.dart. (-2.48 points)

Analysis of lib/src/key.dart reported 5 hints:

line 122 col 25: Unnecessary new keyword.

line 225 col 23: Unnecessary new keyword.

line 229 col 18: Unnecessary new keyword.

line 241 col 18: Unnecessary new keyword.

line 254 col 20: Unnecessary new keyword.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and snaxdart_ecc.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
bs58check ^1.0.1 1.0.1
pointycastle ^1.0.1 1.0.2
Transitive dependencies
charcode 1.1.2
collection 1.14.12
convert 2.1.1
crypto 2.1.4
hex 0.1.2
typed_data 1.1.6
Dev dependencies
test ^1.0.0