我正在使用Dropbox API。在示例應用程序,它包含這些行:在Android中存儲API密鑰足夠充分嗎?
// Replace this with your consumer key and secret assigned by Dropbox.
// Note that this is a really insecure way to do this, and you shouldn't
// ship code which contains your key & secret in such an obvious way.
// Obfuscation is good.
final static private String CONSUMER_KEY = "PUT_YOUR_CONSUMER_KEY_HERE";
final static private String CONSUMER_SECRET = "PUT_YOUR_CONSUMER_SECRET_HERE";
我很清楚的口頭禪「保密是不是安全」,並混淆真的只是略微增加的努力來提取密鑰所需要的量。我不同意他們的說法:「善意是好的」。我應該怎麼做才能保護鑰匙呢?是不是很好夠了,還是我應該考慮一些更精細的東西?
請在此處閱讀有關此主題的討論:https://groups.google.com/d/topic/android-developers/quD5gYIZ4Ig/discussion – 2011-01-13 08:05:07