Reputation: 289
Will the same data always generate the same QR code?
Upvotes: 0
Views: 150
Reputation: 4731
I recently confronted this problem and am answering an old question for future readers.
In an ideal condition, an input data under a certain set of encoding parameters should be encoded into a specific QR code deterministically and universally. The parameters are the version(the width of the QR code), the error correction level, and the encoding mode.
But in the real world, the situation is different. The specification(ISO IEC 18004:2015) contains an ambiguous and erroneous description on the scoring of data masking. Incorrect scoring procedure produces a QR code that is more sensitive to a noise on the decoder side, but decoded into the correct data. Due to this reason, most open source QR code generators incorrectly encode the QR code. (And there may exist improper proprietary generators.) So, you can observe different QR codes from different implementations under the same encoding parameters.
But most implementations will generate QR codes consistently. (Same inputs into a specific implementation will result the same output.)
Upvotes: 0
Reputation: 10081
There is no randomness in QR Codes.
Anyway, there are some parameters that should change the output you get for the same data:
This article on wkipedia should answer to many of the questions you can ask about QR Codes.
Upvotes: 0
Reputation: 418
The algorithm to generate QR codes does not include any randomness as it is simply a method for representing data.
Upvotes: 2