A small utility library for crypto. It declares a class names
CryptoUtils which can replace the one in
package:crypto. It includes the few methods this class provides.
I created this library because I had a bunch of crypto-related utility functions that I used across different projects and wanted to avoid code duplication.
If you have other crypto-related code you don't want to duplicate, feel free to include it and file a PR.
Currently it includes:
- all the methods
- a Codec (including separate encoder and decoder classes) for the following encidongs:
- an abstract class
Hashand several fixed-sized hash classes,
- Remove base58(check) codec because it is in package:base58check
- Remove UnmodifiableUint8List (remove zengen dependency)
- Updated bignum dependency to v0.1.0
- Changed the library structure to have separate libraries for all aspects and have `cryptoutils.dart`` export them all.
- Used ZenGen for delegation so that dart:mirrors is no longer used.
0.1.10 (2015-06-10) #
- Updated dependency of bignum to latest version (0.0.6)
- Updated dependency of collection to latest version (1.1.1)
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: cryptoutils: ^0.4.0
2. Install it
You can install packages from the command line:
$ pub get
$ 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:
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]
We analyzed this package on Feb 13, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.1
- pana: 0.13.5
lib/hash.dart. (-10.89 points)
lib/hash.dart reported 23 hints, including:
line 11 col 1: Prefer using /// for doc comments.
line 17 col 3: Prefer using /// for doc comments.
line 20 col 36: Unnecessary new keyword.
line 22 col 3: Prefer using /// for doc comments.
line 32 col 3: Prefer using /// for doc comments.
lib/encoding/base64.dart. (-8.17 points)
lib/encoding/base64.dart reported 17 hints, including:
line 11 col 8: Don't type annotate initializing formals.
line 11 col 35: Don't type annotate initializing formals.
line 15 col 7: Unnecessary new keyword.
line 18 col 47: Unnecessary new keyword.
line 21 col 1: Prefer using /// for doc comments.
lib/utils.dart. (-7.24 points)
lib/utils.dart reported 15 hints, including:
line 8 col 3: Prefer using /// for doc comments.
line 14 col 3: Prefer using /// for doc comments.
line 19 col 18: Unnecessary new keyword.
line 26 col 3: Prefer using /// for doc comments.
line 33 col 24: Unnecessary new keyword.
lib/src/hash/fixed-sized-hashes.dart. (-5.36 points)
lib/src/hash/fixed-sized-hashes.dart reported 11 hints, including:
line 7 col 28: Unnecessary new keyword.
line 12 col 7: DO use curly braces for all flow control structures.
line 12 col 13: Unnecessary new keyword.
line 19 col 36: Unnecessary new keyword.
line 19 col 48: Unnecessary new keyword.
The package description is too short. (-20 points)
Add more detail to the
description field of
pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.
Package is getting outdated. (-15.07 points)
The package was last published 60 weeks ago.
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
cryptoutils.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.