DavBfr / dart_barcode

Barcode generation library
https://pub.dev/packages/barcode
Apache License 2.0
132 stars 41 forks source link

Error generating raw bytes #36

Closed carlosrzisc closed 5 months ago

carlosrzisc commented 2 years ago

Hello @DavBfr, First of all, thanks for this great and unique library generating barcodes.

I have an issue generating aztec codes with raw bytes, we are expecting no alterations on those raw bytes. Sometimes, it gets modified and we scan this we get different bytes. We noticed that in the aztec.dart file you are doing some encoding before getting the aztec code, so maybe that encoding is trying to save on the size which is really cool, the problem is that sometimes it generates a wrong aztec code.

Is there any way we can send raw bytes and have no any alterations on these?

This is an example of the bytes that we send and what we get:

GENERATED BYTES(HEX) FROM THE APP: 78DA55903D68144114C74D0AC14250031241314D1A717566F6E33E6CE4C8DE9D510CE636DEEE8A84993773EE72BB77EBDEBAC674E709129B58A6B0702FA88DC4CA42040BB5B0520449217E80A509885DB0727217210E3C7E6FFEF3E6F1FEAF4FD312C53472464FF66CEF11D0E09AA8D6886E00F779D3AC7B951927C465DB84A6CF1714AC61268841951CA50D45534943611A160AC306E8823042745624886094975549F42FB5085209D25CA051C4B49C33F2A067DF7902BECFE56DD0BA08269E03ABD4B4B1A9CF98DEA2839BC4C24120CA5E75B6CCAB3C2C53A715CCD62A49895B8045DDADD5EDA859BF04BCB3DD54C2FF6F62B110ED1A80A8482DB80383E6C060E8A7D4B03F66F26BF73187F904DA5AAE382163B1DD12C52BF8AA14D390E26D244388215A0384FC6E0611EF7405BE25682CF3A0253AA952333368D078156898707C0A21801B319CAB9D8794261C49218324826E1F8026142089E98854E412C60D54C0CC600CE106625ABEA0E19C86908AE573DB1F9AD1916649A8BAEE66D069A73B1671DE42F210DDB5CF3AEEB7F6B3AD3F9FDE7D7FB839997E61717E6DFEC5E1B5FD4B077F9DBEF774F984777CFDF6E8E7E95767AE33FBED743559B9FFFEEBF30F5395F1FE1C3D34B5D5B3272EBCBCF963255C0E8EAEEEBD7CD17B7DECF7810D75F2CDE6FA913D3FC7C696F675FE02E1E1C97C

SCANNED BYTES 78DA55903D68144114C74D0AC14250031241314D1A717566F6E33E6CE4C8DE9D510CE636DEEE8A84993773EE72BB77EBDEBAC674E709129B58A6B0702FA88DC4CA42040BB5B0520449217E80A509885DB0727217210E3C7E6FFEF3E6F1FEAF4FD312C53472464FF66CEF11D0E09AA8D6886E5735325546564447584332ED574848554E4169697777686570203E696664646D05400903611A160AC306E8823042745624886094975549F42FB5085209D25CA051C4B49C33F2A067DF7902BECFE56DD0BA08269E03ABD4B4B1A9CF98DEA2839BC4C24120CA5E75B6CCAB3C2C53A715CCD62A49895B8045DDADD5EDA859BF04BCB3DD54C2FF6F62B110ED1A80A8482DB80383E6C060E8A7D4B03F66F26BF73187F904DA5AAE382163B1DD12C52BF8AA14D390E26D244388215A0384FC6E0611EF7405BE25682CF3A0253AA952333368D078156898707C0A21801B319CAB9D8794261C49218324826E1F8026142089E98854E412C60D54C0CC600CE106625ABEA0E19C86908AE573DB1F9AD1916649A8BAEE66D069A73B1671DE42F210DDB5CF3AEEB7F6B3AD3F9FDE7D7FB839997E61717E6DFEC5E1B5FD4B077F9DBEF774F984777CFDF6E8E7E95767AE33FBED743559B9FFFEEBF30F5395F1FE1C3D34B5D5B3272EBCBCF963255C0E8EAEEEBD7CD17B7DECF7810D75F2CDE6FA913D3FC7C696F675FE02E1E1C97C

Thank you in advance.

DavBfr commented 2 years ago

Maybe an issue here.

carlosrzisc commented 2 years ago

@DavBfr thank you. While you look at this issue. Is there any way we get the generated bytes for the aztec code? so at least we can validate the generated bytes against the bytes sent and see if those are matching. We can validate and if these are not the same then we can try generating a new aztec code with different bytes.

DavBfr commented 2 years ago

If there is a bug, I don't think so. Have you tested with QRCode and/or DataMatrix?

DavBfr commented 2 years ago

Can you give more information on how you tested this? What scanner did you use, and what other generator you tested?

Thorbear commented 2 years ago

Aztec generators that have been used to achieve this in other projects:

Debug app made for checking this issue specifically, which simply outputs the raw bytes from the barcode to the screen: https://github.com/Thorbear/aztec-bytes-debugging/releases