我必須將我的應用程序的私鑰存儲在android設備的安全位置,我閱讀了有關certStore的內容,但它不允許在其中存儲文件。 有沒有我可以安全地存儲它的位置,並且在應用程序重新安裝時不會被刪除。Android中的私鑰存儲
回答
You can store the key in the Preferences of your App. This will protect the key from
getting read by other applications because of the underlying file system restrictions of
the Android system.
但是,這不會保護密鑰免於被用戶自己讀取。
如果您希望在您的應用程序被刪除並再次安裝到設備中後使用此共享首選項,請嘗試Android備份管理器。 我認爲它可以幫助你重新安裝你的活動數據。
EDIT: Android (unfortunately) does not provide a way to do so. The approach I've used
before is to encrypt this token with another key generated within the app.
Your app key can be algorithmically generated. This, however, is only as secure as
your algorithm. Once that is known this is equivalent to storing the token in plain text.
謝謝。
他們能夠訪問此文件夾,如果電話是植根? – Mal
是的,如果電話是根源的,那麼他們可以訪問這個目錄。 – user370305
但是如果你在你的活動或類中編寫了這個密鑰,並且一旦你的apk創建完成後,一旦使用了progaurd或任何其他安全工具,那麼我不認爲任何人都可以輕易得到它。 – user370305
- 1. 存儲RSA私鑰Android
- 2. 私鑰的安全存儲
- 3. 從私鑰中刪除公鑰私鑰存儲與GPG
- 4. 使用DSACryptoServiceProvider存儲私鑰
- 5. 如何存儲RSA私鑰,公鑰
- 6. 上傳私鑰到rundeck密鑰存儲
- 7. 在數據庫中存儲私鑰
- 8. 存儲〜/ .ssh以外的私鑰
- 9. 如何在Android中安全地存儲EC私鑰?
- 10. 如何使用私鑰從Android的存儲
- 11. 遠程存儲密碼保護私鑰
- 12. WSO2 API Manager在哪裏存儲私鑰
- 13. 在Web服務器上存儲私鑰
- 14. C#X509Certificate2:在哪裏存儲私鑰?
- 15. 在mysql中存儲和檢索DSA公鑰和私鑰
- 16. 如何在Silverlight 4中安全地存儲密鑰或私鑰?
- 17. 將私鑰和公鑰存儲在數據庫中
- 18. 將公鑰/私鑰安全地存儲在數據庫中
- 19. 如何在MS SQL Server中存儲公鑰/私鑰?
- 20. AndroidKeyStore在AndroidKeyStore中存儲私鑰和公鑰?
- 21. 如何將私鑰存儲在密鑰容器中?
- 22. Android密鑰存儲區存儲令牌
- 23. Android的密鑰存儲提供商 - 如何存儲密鑰
- 24. 從磁盤加載存儲的RSA公鑰/私鑰?
- 25. 導入現有的私有密鑰到密鑰存儲BKS
- 26. 信任存儲和密鑰存儲如何保護根證書和私鑰?
- 27. 在android中存儲密鑰的位置?
- 28. Android私鑰問題。
- 29. Android私鑰問題
- 30. Android密鑰存儲文件
你在應用程序中使用該鍵嗎? – user370305
是的,我收到來自web的響應並用這個密鑰 – Mal
進行解密,因此,在這種情況下,您只有一個選項是使用共享首選項,在私有模式下,則只有您的應用程序可以訪問此共享首選項。 – user370305