title: Generate a symmetric key on iOS using Security.framework
body: <p>I'm struggling to generate a symmetric key in iOS using the security framework. There is a method <code>SecKeyGenerateSymmetric()</code> in <code>SecKey.h</code> but its for macOS only. The only thing I see available is <code>SecKeyGeneratePair()</code> which is for asymmetric encryption.</p>
  
  <p>Also from reading this <a href="https://developer.apple.com/documentation/security/certificate_key_and_trust_services/keys/using_keys_for_encryption" rel="nofollow noreferrer">documentation</a> it looks the only way to do symmetric encryption is by generating an asymmetric key pair and calling <code>SecKeyCreateEncryptedData()</code> with the public key and behind the scenes a symmetric key is generated but you don't have access to it. I need to have access to the symmetric key.</p>
  
  <p>If anyone has experience doing symmetric encryption on iOS I would be grateful of some guidance.</p>