在iOS上使用Apples libcommonCrypto.dylib时,kSecAttrIsPermanent属性的用法是什么? 
  
 
Apples documentation说:
The corresponding value is of type CFBooleanRef and indicates whether
this cryptographic key is to be stored permanently.
是什么原因不能永久存储钥匙串中的东西以及存储多长时间? (直到重启?直到应用程序关闭?直到应用程序被卸载?)
解决方法
 它是生成密钥时SecKeyGeneratePair中使用的参数. 
  
 
        从Certificate,Key,and Trust Services Reference
kSecAttrIsPermanent— If this key is present and has a Boolean value of true,the key or key pair is added to the default keychain.
在这种情况下,如果您提供此参数并且它为false,那么您将在内存中接收密钥,但它不会持久保存到密钥链(磁盘上).在应用程序仍在运行时,它会持续很长时间,除非你自己坚持下去.