SimonScholz / qr-code-with-logo

Create a highly customizable QR code with optional Logo in Kotlin or Java
Apache License 2.0
25 stars 2 forks source link

Encoding a Byte[] in a QR code #73

Open softwaremagico opened 4 months ago

softwaremagico commented 4 months ago

There is any way to use the QR encoder for using a byte array? I am not an expert on QR codes, and I do not know if this is feasible or not.

Currently, the QrCodeConfig accepts qrCodeText as a String. That is fine if you want to put an URL, or some text data. But in some cases, I want to pass data as a byte array. For example if the data is encrypted between two applications.

Note: that converting a byte[] to a String is not an option as the byte[] will be modified in some cases. An option will be to convert the byte[] to Base64, but this increase the size of the QR.

SimonScholz commented 4 months ago

Hi @softwaremagico,

I will have a look at this as soon as possible. I really appreciate your ideas and the proposal of new enhancements. I'll check out if zxing can help us in that regard, but I am also considering getting rid of the zxing dependency. So zxing should not be a blocker for this feature to come. I'll give an update here once I gain more insights on this topic.

softwaremagico commented 3 months ago

Thanks for your answer. I am not sure if this is possible or not, but if it is, it will be appreciated. Thanks again!