Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I have a nfc tag with ndef text record. The text is
Paris/London
and anyone with nfc tag reading app can read it like this.
How should i encrypt/encode this text so that is human unreadable? I want my app to decrypt/decode it so it can use it.
您可以设置一个表格,将可能的字符串映射到整数,而不是使用这些字符串。例如:巴黎 -> 0、伦敦 -> 1 等。然后您的标签可能包含文本“0/1”,没有您的桌子的任何人都无法解释。
另一种可能性是简单地加密字符串。但是,要将其存储在 NFC 标签上,您必须创建自己的 NDEF 记录类型,或者,例如,使用 Base64 编码能够将加密字符串存储在 NDEF 文本记录中(因为它应该只包含人类可读的文本)。