2011-09-16 6 views
2

안드로이드 장치의 안전한 위치에 내 앱의 개인 키를 저장해야하는데, 나는 certStore에 대해 읽었지만 파일을 저장할 수는 없습니다. 안전하게 저장할 수있는 위치가 있으며 앱을 다시 설치하면 삭제되지 않습니다.안드로이드에서 개인 키 저장

+0

해당 키를 응용 프로그램에 사용하고 있습니까? – user370305

+0

예, 웹에서 응답을 받고이 키로 암호 해독 – Mal

+0

그래서이 옵션에는 공유 환경 설정이 전용 모드로 사용됩니다.이 경우 개인 모드에서만 응용 프로그램 만이이 공유 환경 설정에 액세스 할 수 있습니다. – user370305

답변

1
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. 

감사합니다.

+0

이 폴더에 액세스 할 수 있습니까? – Mal

+0

예, 전화가 루트이면이 디렉토리에 액세스 할 수 있습니다. – user370305

+0

하지만이 액티비티 나 클래스에이 키를 쓰고 apk가 생성되면 progaurd 나 다른 보안 도구를 사용하면 아무도 쉽게 얻을 수 없다고 생각합니다. – user370305