我正在使用 Dropbox 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";
我很清楚“保密不是安全”的口头禅,而混淆实际上只会稍微增加提取密钥所需的工作量。我不同意他们的说法“混淆是好的”。那我应该怎么做才能保护密钥呢?混淆是否足够好,还是我应该考虑更复杂的东西?