Dart's official package for SHA, MD5 and HMAC hashing
open sourceBSD-3-Clausefree
crypto is the Dart team's package of cryptographic hash functions for Dart and Flutter: SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256 and MD5, plus HMAC with any of them. It hashes a list of bytes in one call or chunked input through a conversion sink, and returns a Digest as bytes or a hex string. It's part of the dart-lang/core repository and published on pub.dev by dart.dev.
Problems it solves
- compute a SHA-256 hash of a string in Dart or Flutter
- generate an HMAC-SHA256 signature for an API request from Dart
- get the MD5 checksum of a file in a Flutter app
- hash large data in chunks in Dart without loading it all into memory
Features
- SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512
- SHA-512/224 and SHA-512/256
- MD5
- HMAC with any supported hash
- Chunked hashing through a conversion sink
- Digest as bytes or a hex string
