file_signature 1.0.1 copy "file_signature: ^1.0.1" to clipboard
file_signature: ^1.0.1 copied to clipboard

A pure Dart security utility that validates files by checking Magic Byte signatures. Prevents rename attacks (e.g. .exe as .png) on Mobile, Web, and Desktop.

1.0.1 #

  • Fix: Updated README banner and badge URLs to render correctly in IDEs and on Pub.dev.
  • Test: Fixed guardStream unit tests to handle small payloads and stream buffering correctly.
  • Docs: Improved repository documentation visibility and formatting.

1.0.0 #

Initial Release - "Don't trust the file extension. Trust the bits."

  • Core Validation: Added FileSignature.guard(file) to validate XFile types by reading their Magic Bytes (Hex Signature).
  • Stream Security: Added FileSignature.guardStream(stream) to intercept and validate large file uploads without buffering the entire file in RAM.
  • Boolean Check: Added FileSignature.isValid(bytes) for quick checks on memory data (Base64/Clipboard).
  • Supported Formats:
    • Images: PNG, JPEG, GIF, WebP, BMP, HEIC.
    • Documents: PDF.
    • Archives: ZIP (detects DOCX, APK, JAR, etc.).
    • Media: MP4, MOV (ISO Base Media detection).
  • Security: Added explicit blocking for executable malware:
    • Windows (.exe)
    • Linux (.elf)
    • macOS (Mach-O)
  • Universal Support: Full support for Android, iOS, Web (Blob slicing), macOS, Windows, and Linux.
4
likes
160
points
160
downloads

Publisher

verified publisherflutterdude.com

Weekly Downloads

A pure Dart security utility that validates files by checking Magic Byte signatures. Prevents rename attacks (e.g. .exe as .png) on Mobile, Web, and Desktop.

Repository (GitHub)
View/report issues

Topics

#security #files #upload #validation #magic-bytes

Documentation

API reference

License

MIT (license)

Dependencies

cross_file, flutter

More

Packages that depend on file_signature