"encrypted store" 在 Android 中如何使用?
How is "encrypted store" used in Android?
我正在关注 Google 的 IAP 教程 Google In-app
它说:
It is highly recommended that you do not hard-code the exact public license key string value as provided by Google Play. Instead, you can construct the whole public license key string at runtime from substrings, or retrieve it from an encrypted store, before passing it to the constructor.
如何实现 "encrypted store" 来安全地存储字符串?
似乎没有太多关于它的信息。
这就是我为了让饼干变得有趣而做的:
1) 我使用 JNI 隐藏解密密钥,并通过包含来自随机词生成器的数据和一张猫图片确保生成的目标文件大于 256KB。使目标文件大于 256KB 以防止使用 https://www.onlinedisassembler.com/odaweb/ To develop with the NDK, follow this tutorial http://ph0b.com/new-android-studio-ndk-support/
很重要
2) 我 hard-coded 我的加密 Google 在 java class 中播放计费许可证密钥,拆分后分成几个单独的字符串。 (不要放在/res/strings里面,因为用"apktool"反汇编apk后太容易找到了,见https://ibotpeaches.github.io/Apktool/install/
3)这是我用来加密解密的classhttps://github.com/scottyab/AESCrypt-Android/blob/master/aescrypt/src/main/java/com/scottyab/aescrypt/AESCrypt.java
这花了大约 2 天的时间来弄清楚和实施,所以我希望 Google 允许在 "Generate Signed APK" 阶段插入许可证密钥,然后我的应用程序(并且只有我的应用程序)可以阅读。
If anyone has any other suggestions, please comment...
注意:
我想使用 RSA 加密,但我发现计费许可证密钥对于 RSA 来说太大了,因此,使用 AES。
我正在关注 Google 的 IAP 教程 Google In-app
它说:
It is highly recommended that you do not hard-code the exact public license key string value as provided by Google Play. Instead, you can construct the whole public license key string at runtime from substrings, or retrieve it from an encrypted store, before passing it to the constructor.
如何实现 "encrypted store" 来安全地存储字符串? 似乎没有太多关于它的信息。
这就是我为了让饼干变得有趣而做的:
1) 我使用 JNI 隐藏解密密钥,并通过包含来自随机词生成器的数据和一张猫图片确保生成的目标文件大于 256KB。使目标文件大于 256KB 以防止使用 https://www.onlinedisassembler.com/odaweb/ To develop with the NDK, follow this tutorial http://ph0b.com/new-android-studio-ndk-support/
很重要2) 我 hard-coded 我的加密 Google 在 java class 中播放计费许可证密钥,拆分后分成几个单独的字符串。 (不要放在/res/strings里面,因为用"apktool"反汇编apk后太容易找到了,见https://ibotpeaches.github.io/Apktool/install/
3)这是我用来加密解密的classhttps://github.com/scottyab/AESCrypt-Android/blob/master/aescrypt/src/main/java/com/scottyab/aescrypt/AESCrypt.java
这花了大约 2 天的时间来弄清楚和实施,所以我希望 Google 允许在 "Generate Signed APK" 阶段插入许可证密钥,然后我的应用程序(并且只有我的应用程序)可以阅读。
If anyone has any other suggestions, please comment...
注意: 我想使用 RSA 加密,但我发现计费许可证密钥对于 RSA 来说太大了,因此,使用 AES。