tripledes 2.1.0

tripledes-dart #

Triple DES and DES block cipher implementation ported from CryptoJS

Build Status

This is ported from CryptoJS. The latest version can be found bryx/cryptojs or sytelus/CryptoJS

Example #

import 'package:tripledes/tripledes.dart';

main() {
  var key = "cipher";
  var blockCipher = new BlockCipher(new DESEngine(), key);
  var message = "Driving in from the edge of town";
  var ciphertext = blockCipher.encodeB64(message);
  var decoded = blockCipher.decodeB64(ciphertext);

  print("key: $key");
  print("message: $message");
  print("ciphertext (base64): $ciphertext");
  print("decoded ciphertext: $decoded");
}

Use this package as a library

1. Depend on it

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


dependencies:
  tripledes: ^2.1.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:tripledes/tripledes.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
81
Health:
Code health derived from static analysis. [more]
93
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
55
Overall:
Weighted score of the above. [more]
79
Learn more about scoring.

We analyzed this package on Nov 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:tripledes/tripledes.dart.

Health issues and suggestions

Document public APIs. (-0.23 points)

37 out of 38 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/src/utils.dart. (-3.45 points)

Analysis of lib/src/utils.dart reported 7 hints, including:

line 12 col 16: Unnecessary new keyword.

line 24 col 7: Unnecessary new keyword.

line 53 col 17: Unnecessary new keyword.

line 133 col 15: Unnecessary new keyword.

line 153 col 10: Unnecessary new keyword.

Fix lib/src/des.dart. (-1.99 points)

Analysis of lib/src/des.dart reported 4 hints:

line 18 col 19: Unnecessary new keyword.

line 27 col 35: Unnecessary new keyword.

line 30 col 39: Unnecessary new keyword.

line 58 col 34: Unnecessary new keyword.

Fix lib/src/tripledes.dart. (-1.49 points)

Analysis of lib/src/tripledes.dart reported 3 hints:

line 10 col 16: Unnecessary new keyword.

line 11 col 16: Unnecessary new keyword.

line 12 col 16: Unnecessary new keyword.

Fix lib/src/engine.dart. (-0.50 points)

Analysis of lib/src/engine.dart reported 1 hint:

line 69 col 18: Unnecessary new keyword.

Format lib/src/block_cipher.dart.

Run dartfmt to format lib/src/block_cipher.dart.

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Package is getting outdated. (-25.21 points)

The package was last published 65 weeks ago.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

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

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
Dev dependencies
test ^1.3.0