简体   繁体   English

秘密QR码-仅由我自己的扫描仪应用读取

[英]Secret QR Code - Only read by my own scanner app

I am working on a social app like Instagram, Snap Chat, and Facebook. 我正在开发Instagram,Snap Chat和Facebook等社交应用程序。 I need to generate a QR code of user profiles. 我需要生成用户个人资料的QR码。 I have hidden user ids from the database. 我从数据库中隐藏了用户ID。 I have a scanner in my app to scan the QR code. 我的应用程序中有一个扫描仪,用于扫描QR码。 The functionality is working fine. 该功能运行正常。

But when my generated QR codes are read by other scanner apps, like the iOS default scanner, it reads the user id (string, text) from the QR code. 但是,当我生成的QR码被其他扫描仪应用(例如iOS默认扫描仪)读取时,它会从QR码中读取用户ID(字符串,文本)。

I have used Swift default code for QR code generation. 我已经使用Swift默认代码生成QR代码。

QR code read only by my app. QR码仅由我的应用读取。

Like Snap Chat, Messenger, etc. 像Snap Chat,Messenger等。

Have a look at this article 看看这篇文章

How is Snapchat QR code so different than others? Snapchat QR码与其他人有何不同?

Snapchat and other apps have designed their own methods to create and read a QR code. Snapchat和其他应用设计了自己的方法来创建和读取QR码。 Snapchat uses its own processing techniques to detect a series of dots to scan the code. Snapchat使用其自身的处理技术来检测一系列点以扫描代码。 It uses the snapchat logo for reference in the image to know where exactly to start the scanning. 它使用Snapchat徽标作为图像中的参考,以确切地知道从何处开始扫描。 I am pretty sure Facebook and other apps are doing something similar. 我很确定Facebook和其他应用程序在做类似的事情。

You can maybe look at something that Instagram is doing. 您也许可以看看Instagram正在做的事情。 They use Text Detection to read a users name tag. 他们使用文本检测来读取用户名称标签。 You can look into this article for the same. 您可以对本文进行同样的研究。

Text Detection Article 文字检测文章

As far as i know there is no direct way that you can achieve this. 据我所知,没有直接的方法可以实现这一目标。 You will have to essentially re-invent the wheel and come up with your own way to generate and read a code that is specific to your app. 您将必须从根本上重新发明轮子,并提出自己的方式来生成和读取特定于您的应用程序的代码。

Another approach would be to use an encryption algorithm to encrypt and decrypt your message and then using the QR code generator to generate a QR code of the encrypted message. 另一种方法是使用加密算法加密和解密您的消息,然后使用QR码生成器生成加密消息的QR码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM