title: Swift 2 Decode base64 always return nil
body: <p>I'm trying to decode the following string from base64 without any exit. It always returns nil. I have tried to change NSDataBase64DecodingOptions to IgnoreUnknowCharanters but it doesn't work either. I also tried to remove the padding like this answer says <a href="https://stackoverflow.com/questions/36364324/swift-base64-decoding-returns-nil/36366421#36366421">swift base64 decoding returns nil</a> but the length of my string is divisible by 4 so It doesn't works.</p>
  
  <p>string</p>
  
  <pre><code>PY5ehymWfQKExWxPyOImGiQkxNjyuBREmOXtQdePVpuH9PFzizaO+WTuM1sLouTQPz5UO7csloC9GjOFqkq4POmlB9d3mMJGLB2pVCNs8t9EejOcjV4fRHaITkmfMfVbizCnTvHGBwLWXjLc7gwyhu2+S9qw0NXc5jw6EdEk+zuesrdwLgqws0hDqFSoVw57+CnvUmgXwtNfKP4p64mJ9inH/0xAMarCc5N4Wjz/zmlTyd2PoDFUC/iLdZ7csau7X2M=
  </code></pre>
  
  <p>option 1</p>
  
  <pre><code>if let decodedData = NSData(base64EncodedString: base64String, options: NSDataBase64DecodingOptions.IgnoreUnknownCharacters),
          let decodedString = NSString(data: decodedData, encoding: NSUTF8StringEncoding) {
          print(decodedString) // foo
      }
  </code></pre>
  
  <p>option 2</p>
  
  <pre><code> if let decodedData = NSData(base64EncodedString: pnpData, options: NSDataBase64DecodingOptions.init(rawValue: 0)),
          let decodedString = NSString(data: decodedData, encoding: NSUTF8StringEncoding) {
          print(decodedString) // foo
      }
  </code></pre>
  
  <p>Hope you can help me. Thanks!!</p>