title: Encrypt and Decrypt Password in iOS
body: <p>I want to encrypt password in iOS.</p>
  
  <pre><code>NSData *dataIn = [@"Now is the time for all good computers to come to the aid of their masters." dataUsingEncoding:NSASCIIStringEncoding];
  NSMutableData *macOut = [NSMutableData dataWithLength:CC_SHA256_DIGEST_LENGTH];
  
  CC_SHA256(dataIn.bytes, dataIn.length,  macOut.mutableBytes);
  
  NSLog(@"dataIn: %@", dataIn);
  NSLog(@"macOut: %@", macOut);
  </code></pre>
  
  <p>I want to create with a specified key. Is there any way to do this. </p>
  
  <p>Thanks.</p>