Pregunta

I am working on a Web application in Asp.Net 4.5. My requirement is to generate QR Codes through this application but I want those QR Codes to be password protected from scanning. In other words, if someone tries to scan the QR code, it must ask them to enter the password. If the password is correct, it will be scanned otherwise an error messages says - QR code is protected and you must enter a valid password or something like this.

Is this possible? Any pointers will be highly appreciated. Thanks in advance.

¿Fue útil?

Solución 2

the QR code will redirect you to a certain page, right? Why cant you make that webpage password protected instead?

But as JanR pointed out in her/his comment that it is not possible to password protect a QRScan

Otros consejos

A QR code is just a visual representation of a blob of data. So separate blob of data portion from the QR portion, it turns your question in to the following:

I am working on a Web application in Asp.Net 4.5. My requirement is to generate byte[]s through this application but I want those byte[]s to be password protected from being processed. In other words, if someone tries to process the byte[], it must ask them to enter the password. If the password is correct, it will be processed otherwise an error messages says - byte[] is protected and you must enter a valid password or something like this. Oh yea, and I want to represent the byte[] as a QR code on the screen.

Now that problem is not hard to solve at all, just encrypt the byte[] using a password as the key and have the program processing the byte[] prompt for the password then attempt to decrypt the byte[]. If the decrypted object matches the pattern for whatever you are processing (usually this is done by having a header so you can check that certain bytes are certain values) you process the data.

And going from byte[] to QR code is trivial for any QR code library.

EDIT: Of course it all depends on the fact that you have control of the reader application. If you are just using the codes to access a website you need to password protect the website, not the code. This is because you will have no control over the reader of the code so you can't do any non "standard" things that a normal reader would expect to do (like decrypt a binary formatted QR code), most generic readers are just URL typers and you can't use them for much else.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top