crypto 2.0.2+1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 99

Library of cryptographic functions for Dart

A set of cryptographic functions implemented in pure Dart.

  • MD5
  • SHA1
  • SHA265
  • HMAC
  • Converting a list of bytes into a hex string
  • Converting a list of bytes into a base64-encoded string.
  • Converting a Base 64 encoded String into list of bytes.

Test status

See http://build.chromium.org/p/client.dart.packages/console

The individual builders are at:

http://build.chromium.org/p/client.dart.packages/builders/packages-windows-crypto http://build.chromium.org/p/client.dart.packages/builders/packages-linux-crypto http://build.chromium.org/p/client.dart.packages/builders/packages-mac-crypto

Disclaimer

Support for this library is given as best effort.

This library has not been reviewed or vetted by security professionals.

Features and bugs

Please file feature requests and bugs at the issue tracker.

2.0.2+1

  • Fix SDK constraint.

2.0.2

  • Prepare HashSink implementation for limiting integers to 64 bits in Dart language.

2.0.1

  • Support convert 2.0.0.

2.0.0

Note: There are no APIs in 2.0.0 that weren't also in 0.9.2. Packages that would use 2.0.0 as a lower bound should use 0.9.2 instead—for example, crypto: ">=0.9.2 <3.0.0".

  • Hash and Hmac no longer extend ChunkedConverter.

1.1.1

  • Properly close sinks passed to Hash.startChunkedConversion() when ByteConversionSink.close() is called.

1.1.0

  • Hmac and Hash now extend the new ChunkedConverter class from dart:convert.

  • Fix all strong mode warnings.

1.0.0

  • All APIs that were deprecated in 0.9.2 have been removed. No new APIs have been added. Packages that would use 1.0.0 as a lower bound should use 0.9.2 instead—for example, crypto: ">=0.9.2 <2.0.0".

0.9.2+1

  • Avoid core library methods that don't work on dart2js.

0.9.2

  • Hash, MD5, SHA1, and SHA256 now implement Converter. They convert between List<int>s and the new Digest class, which represents a hash digest. The Converter APIs—Hash.convert() and Hash.startChunkedConversion—should be used in preference to the old APIs, which are now deprecated.

  • SHA1, SHA256, and HMAC have been renamed to Sha1, Sha256, and Hmac, respectively. The old names still work, but are deprecated.

  • Top-level sha1, sha256, and md5 fields have been added to make it easier to use those hash algorithms without having to instantiate new instances.

  • Hashing now works correctly for input sizes up to 2^64 bytes.

Deprecations

  • Hash.add, Hash.close, and Hash.newInstance are deprecated. Hash.convert should be used for hashing single values, and Hash.startChunkedConversion should be used for hashing streamed values.

  • SHA1 and SHA256 are deprecated. Use the top-level sha1 and sha256 fields instead.

  • While the MD5 class is not deprecated, the new MD5() constructor is. Use the top-level md5 field instead.

  • HMAC is deprecated. Use Hmac instead.

  • Base64Codec, Base64Encoder, Base64Decoder, Base64EncoderSink, Base64DecoderSink, and BASE64 are deprecated. Use the Base64 APIs in dart:convert instead.

  • CryptoUtils is deprecated. Use the Base64 APIs in dart:convert and the hex APIs in the convert package instead.

0.9.1

  • Base64 convert returns an Uint8List
  • Base64 codec and encoder can now take an encodePaddingCharacter
  • Implement a Base64 codec similar to codecs in 'dart:convert'

0.9.0

  • ChangeLog starts here.

1. Depend on it

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


dependencies:
  crypto: "^2.0.2+1"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:crypto/crypto.dart';
        
Version Uploaded Documentation Archive
2.0.2+1 Sep 19, 2017 Go to the documentation of crypto 2.0.2+1 Download crypto 2.0.2+1 archive
2.0.2 Jul 19, 2017 Go to the documentation of crypto 2.0.2 Download crypto 2.0.2 archive
2.0.1 Jun 3, 2016 Go to the documentation of crypto 2.0.1 Download crypto 2.0.1 archive
2.0.0 Jun 3, 2016 Go to the documentation of crypto 2.0.0 Download crypto 2.0.0 archive
1.1.1 Apr 21, 2016 Go to the documentation of crypto 1.1.1 Download crypto 1.1.1 archive
1.1.0 Apr 14, 2016 Go to the documentation of crypto 1.1.0 Download crypto 1.1.0 archive
1.0.0 Mar 28, 2016 Go to the documentation of crypto 1.0.0 Download crypto 1.0.0 archive
0.9.2+1 Mar 23, 2016 Go to the documentation of crypto 0.9.2+1 Download crypto 0.9.2+1 archive
0.9.2 Mar 23, 2016 Go to the documentation of crypto 0.9.2 Download crypto 0.9.2 archive
0.9.1 Sep 16, 2015 Go to the documentation of crypto 0.9.1 Download crypto 0.9.1 archive

All 60 versions...

Analysis

This feature is new.
We welcome feedback.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Dec 6, 2017
  • Dart: 2.0.0-dev.8.0
  • pana: 0.7.3+1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
98
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall score:
Weighted score of the above. [more]
99

Platforms

Detected platforms: Flutter, server, web

All libraries agree

Dependencies

Package Constraint Resolved Available
Direct dependencies
collection ^1.0.0 1.14.3
convert >=1.0.0 <3.0.0 2.0.1
typed_data ^1.0.0 1.1.5
Transitive dependencies
charcode 1.1.1
Dev dependencies
test ^0.12.17