file_digest 0.0.1 copy "file_digest: ^0.0.1" to clipboard
file_digest: ^0.0.1 copied to clipboard

Easily create digest hex for files

Features

  • Simple API
  • Uses Web Workers in Web platforms to speed up parsing.
  • Uses Isolate.run in other platforms

Why was this made?

Originally, it developed to handle digest creating in a web worker in web platforms. As parsing a large file in the main thread would freeze the app.

Example

From Uint8List file data

final Uint8List data = ...;

final String sha256 = await FileDigest(data).sha256();
final String sha512 = await FileDigest(data).sha512();

From String content

const input = 'Test content';
final String sha256 = await FileDigest.fromString(input).sha256();
final String sha512 = await FileDigest.fromString(input).sha512();
3
likes
0
points
141
downloads

Publisher

unverified uploader

Weekly Downloads

Easily create digest hex for files

Repository (GitHub)
View/report issues

Topics

#file #digest

License

unknown (license)

Dependencies

crypto, flutter, flutter_web_plugins

More

Packages that depend on file_digest