title: IOS 3DES in swift
body: <p>I managed to import CommonCryptor.h via a bridge header,</p>
  
  <pre><code>#import &lt;CommonCrypto/CommonCryptor.h&gt; 
  </code></pre>
  
  <p>However, while I'm trying to encrypt text use CCCrypt method(refer the way in Object-c), I got a compile error.</p>
  
  <p><strong>'Int' is not convertible to CCOperation.</strong></p>
  
  <pre><code>var key:String = "wKNvJ4NuyW";
  
      func encrypt(text: String) -&gt;String{
  
  
          var result:CCCryptorStatus = CCCrypt(
              kCCEncrypt, //Error here!!! it says 'Int' is not convertible to CCOperation.
              kCCAlgorithm3DES,
              kCCOptionPKCS7Padding | kCCOptionECBMode,
              key,
              kCCKeySize3DES,
              nil,
              ....
      }
  </code></pre>
  
  <p>Could anybody tell me how to solve this issue? why it works in object-c not swift?</p>
  
  <p>Thanks.</p>