secure_qr_generator 1.1.0 copy "secure_qr_generator: ^1.1.0" to clipboard
secure_qr_generator: ^1.1.0 copied to clipboard

A Flutter package for generating secure, auto-regenerating QR codes with encryption, digital signatures, and automatic expiration management.

Changelog #

All notable changes to the Secure QR Generator will be documented in this file.

1.1.0 - 2026-07-14 #

Added #

  • New compact payload format: CBOR serialization + Base45 encoding, replacing JSON + Base64 for a significantly smaller, faster-to-scan QR code
  • QrPayloadFormat enum (legacy / compact) and GeneratorConfig.payloadFormat to select which format generateQR emits
  • Encrypt-then-MAC signing order for the compact format: the HMAC-SHA256 tag is now computed over the encrypted body (IV + ciphertext) rather than the plaintext, so a tampered or corrupted QR code can be rejected by the validator before it attempts decryption
  • Compact format uses short integer keys (03) instead of named JSON fields, and stores the QR code id as raw bytes instead of a UUID string — both reduce payload size independently of your business data

Changed #

  • estimateQRSize and canEncodeData now compute their estimate based on the currently configured payloadFormat, instead of always assuming the legacy JSON/Base64 overhead
  • Internal payload size limit is enforced per format: 700 bytes of raw CBOR for compact, 2000 characters of JSON for legacy (unchanged from previous versions)

Migration notes #

  • No breaking changes. Existing code continues to emit the legacy JSON + Base64 format unless payloadFormat: QrPayloadFormat.compact is explicitly set — GeneratorConfig's default is legacy.
  • Before switching any generator to compact, make sure every reader of its QR codes (peer app instances and/or your own terminals) is running secure_qr_validator 1.2.0 or later, which understands both formats. A validator on an earlier version only understands legacy and will fail to read compact-format QR codes.
  • For a gradual, reversible switch (recommended for peer-to-peer scanning scenarios), drive GeneratorConfig.payloadFormat from a remotely-controlled flag rather than a hardcoded value, so you can roll back instantly if some peers are still on an old validator.
  • New dependencies pulled in by this package: cbor and base45.

1.0.7 - 2026-06-26 #

Changed #

  • Use of Flutter 3.38.6
  • Enhance QR performance
  • Update uuid version

1.0.6 - 2024-12-25 #

Added #

  • add example directory for using library

1.0.5 #

Added #

  • reviews class comments

1.0.4 #

Added #

  • update readme

1.0.3 #

Added #

  • fix bug: QrImageView

1.0.2 #

Added #

  • add units tests

1.0.1 #

Added #

  • allow to add custom qrcode by consider builder attribute

1.0.0 #

Added #

  • Initial release
  • Secure QR code generation
  • Integrated Flutter widgets
2
likes
160
points
207
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter package for generating secure, auto-regenerating QR codes with encryption, digital signatures, and automatic expiration management.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

base45, cbor, crypto, encrypt, flutter, qr_flutter

More

Packages that depend on secure_qr_generator