title: How to Encrypt, Decrypt and Delete a plist file
body: <p>I am making a password app that stores user logins/password etc for credit card, bank info etc into a plist file. I have googled and I know how to encrypt and decrypt a string using AES encryption with key. I got that to work for simple login and password. I encrypt and save the login and password to NSdata and then decrypt and read it</p>
  
  <pre><code>- (NSData *)AES256EncryptWithKey:(NSString *)key;
  - (NSData *)AES256DecryptWithKey:(NSString *)key;
  
  
  - (NSData*) encryptString:(NSString*)plaintext withKey:(NSString*)key;
  - (NSString*) decryptData:(NSData*)ciphertext withKey:(NSString*)key;
  </code></pre>
  
  <p>What I want to do is when the user exits my app by pushing the home button, I want to encrypt the password.plist file save it as an encrypted datafile and then delete the readable password.plist xml file from his iPhone. (password.plist file will have multiple rows, values e.g. credit card1 info, credit card2 info etc)</p>
  
  <p>When the user logs back in I want to decrypt and recreate password.plist file. Anyone know how this can be done?</p>