Closed Deleplace closed 8 years ago
Very related to issue #50 [Micro QR-code]
Possible error correction levels are L, M, Q, H. Default seems to be H.
Error correction "Level M (Medium) 15% of codewords can be restored" is enough for our use case, because the display won't be degraded except by the small red logo in the center.
This yields 21x21 QR-codes, which is the min we can reach with this library, however small the encoded data.
The new settings should theorically let us encode up to 34 decimal digits. The qrcodejs library however lets us encode only 11 "characters", and above yields 25x25 QR-code.
Well, 11 chars (maybe not only digits) should be enough anyway to have a wide range of difficult to guess values, e.g. 62^11 combinations or 72^11 or even more.
This discovery minimizes the QR-code size (21x21 is not that bad), but importantly it makes impracticable for an attacker to guess a random qrKey displayed by someone else.
Thus :
See big changes of #108
Try to have 21x21 blocks, instead of 25x25. Consider encoding channelID on 4 chars instead of 5, if it helps. Try different values of
correctLevel
when calling qrcode.js . Try if specifying "numeric chars only" helps.